FlowiseAI/Flowise · error · Error
Invalid SQLite path: Windows absolute paths are not allowed
Error message
Invalid SQLite path: Windows absolute paths are not allowed
What it means
Thrown by validateSQLitePath (packages/components/src/validator.ts:344) when the path matches ^[a-zA-Z]:\\ — a Windows drive-absolute path. Flowise forbids drive letters on every platform because the allow-list is built around POSIX-style ~/.flowise resolution.
Source
Thrown at packages/components/src/validator.ts:344
return path.join(defaultDir, 'database.sqlite')
}
const bypassPath = userProvidedPath.trim()
return path.isAbsolute(bypassPath) ? bypassPath : path.resolve(path.join(defaultDir, bypassPath))
}
if (!userProvidedPath || userProvidedPath.trim() === '') {
throw new Error('Invalid SQLite path: database path is required')
}
const basePath = userProvidedPath.trim()
if (basePath.includes('..')) throw new Error('Invalid SQLite path: path traversal attempt detected')
if (basePath.toLowerCase().includes('%2e') || basePath.toLowerCase().includes('%2f') || basePath.toLowerCase().includes('%5c'))
throw new Error('Invalid SQLite path: encoded path traversal attempt detected')
// eslint-disable-next-line no-control-regex
if (/\0/.test(basePath) || /[\x00-\x1f]/.test(basePath))
throw new Error('Invalid SQLite path: null bytes or control characters detected')
if (/^[a-zA-Z]:\\/.test(basePath)) throw new Error('Invalid SQLite path: Windows absolute paths are not allowed')
if (/^\\\\[^\\]/.test(basePath)) throw new Error('Invalid SQLite path: UNC paths are not allowed')
if (/^\\\\\?\\/.test(basePath)) throw new Error('Invalid SQLite path: extended-length paths are not allowed')
const resolvedPath = path.isAbsolute(basePath) ? path.resolve(basePath) : path.resolve(path.join(defaultDir, basePath))
if (resolvedPath.includes('..')) throw new Error('Invalid SQLite path: path traversal detected in resolved path')
if (!isPathWithinAllowedSQLiteDirs(resolvedPath, allowedDirs)) {
throw new Error(
`Invalid SQLite path: path must be within allowed directories (${allowedDirs.join(', ')}). Attempted path: ${resolvedPath}`
)
}
return resolvedPath
}
/**
* Restricts SQL executed against a SQLite database opened via validateSQLitePath to aView on GitHub (pinned to abe4a8601a)
Solutions
- Use a relative filename resolved under ~/.flowise.
- Set DATABASE_PATH to a POSIX-style parent dir on Linux/macOS.
- On Windows, point DATABASE_PATH at the desired folder and use a plain filename.
Example fix
// before nodeParams.databasePath = 'C:\\flowise\\app.db' // after nodeParams.databasePath = 'app.db' // -> ~/.flowise/app.db
Defensive patterns
Strategy: validation
Validate before calling
if (/^[a-zA-Z]:\\/.test(String(databasePath ?? ''))) throw new Error('Windows drive path not allowed; use POSIX'); Type guard
const isPosixPath = (p: unknown): p is string => typeof p === 'string' && !/^[a-zA-Z]:[\\/]/.test(p);
Try / catch
try { validateSQLitePath(databasePath) } catch (e) { if (e instanceof Error && /Windows absolute/.test(e.message)) { databasePath = 'database.sqlite' } else throw e } Prevention
- Normalize Windows paths to POSIX for cross-platform deploy.
- Prefer simple filenames.
- Reject drive-letter paths in committed configs via CI.
When it happens
Trigger: A Database Path like 'C:\\Users\\me\\app.db' or 'D:\\data\\db.sqlite' is supplied to a Sql Database node.
Common situations: Windows developers pasting local paths; configs shared across OSes; CI running Linux against Windows-authored configs.
Related errors
- Invalid SQLite path: UNC paths are not allowed
- Invalid path: Windows absolute paths are not allowed
- Invalid SQLite path: path traversal attempt detected
- Invalid SQLite path: encoded path traversal attempt detected
- Invalid SQLite path: null bytes or control characters detect
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/f058143e8da1bd4f.
Report an issue: GitHub.