FlowiseAI/Flowise · error · Error
Invalid SQLite path: UNC paths are not allowed
Error message
Invalid SQLite path: UNC paths are not allowed
What it means
Thrown by validateSQLitePath (packages/components/src/validator.ts:345) when the path matches ^\\\\[^\\] — a UNC path like '\\\\server\\share\\db.sqlite'. UNC paths can address arbitrary network locations, so Flowise forbids them.
Source
Thrown at packages/components/src/validator.ts:345
}
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 a
* single read-only SELECT/WITH statement.View on GitHub (pinned to abe4a8601a)
Solutions
- Mount the share locally and use an allowed absolute path (under ~/.flowise or DATABASE_PATH).
- Copy the DB into ~/.flowise/ and use a plain filename.
- Set DATABASE_PATH to the mount point and keep the filename simple.
Example fix
// before nodeParams.databasePath = '\\\\fileserver\\ai\\app.db' // after nodeParams.databasePath = 'app.db' // DB copied to ~/.flowise/app.db
Defensive patterns
Strategy: validation
Validate before calling
if (/^\\\\[^\\]/.test(String(databasePath ?? ''))) throw new Error('UNC DB path not allowed; use a local mount'); Type guard
const isNotUnc = (p: unknown): p is string => typeof p === 'string' && !/^\\\\[^\\]/.test(p);
Try / catch
try { validateSQLitePath(databasePath) } catch (e) { if (e instanceof Error && /UNC paths/.test(e.message)) { throw new Error('mount the share and use a local path') } else throw e } Prevention
- Mount network shares to a local path; never use UNC in DB paths.
- Set DATABASE_PATH to the mount point.
- Document the local-path convention for DB files.
When it happens
Trigger: A Database Path such as '\\\\fileserver\\ai\\app.db' or '\\\\localhost\\c$\\data\\db.sqlite' is supplied.
Common situations: Windows deployments keeping the DB on a network share; containers inheriting SMB-mounted configs; UNC-mapped drive copy-paste.
Related errors
- Invalid path: UNC paths are not allowed
- Invalid SQLite 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/f6a2b1ea1517bd4d.
Report an issue: GitHub.