{"record":{"id":"f058143e8da1bd4f","repo":"FlowiseAI/Flowise","slug":"invalid-sqlite-path-windows-absolute-paths-are-no","errorCode":null,"errorMessage":"Invalid SQLite path: Windows absolute paths are not allowed","messagePattern":"Invalid SQLite path: Windows absolute paths are not allowed","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/src/validator.ts","lineNumber":344,"sourceCode":"            return path.join(defaultDir, 'database.sqlite')\n        }\n        const bypassPath = userProvidedPath.trim()\n        return path.isAbsolute(bypassPath) ? bypassPath : path.resolve(path.join(defaultDir, bypassPath))\n    }\n\n    if (!userProvidedPath || userProvidedPath.trim() === '') {\n        throw new Error('Invalid SQLite path: database path is required')\n    }\n\n    const basePath = userProvidedPath.trim()\n\n    if (basePath.includes('..')) throw new Error('Invalid SQLite path: path traversal attempt detected')\n    if (basePath.toLowerCase().includes('%2e') || basePath.toLowerCase().includes('%2f') || basePath.toLowerCase().includes('%5c'))\n        throw new Error('Invalid SQLite path: encoded path traversal attempt detected')\n    // eslint-disable-next-line no-control-regex\n    if (/\\0/.test(basePath) || /[\\x00-\\x1f]/.test(basePath))\n        throw new Error('Invalid SQLite path: null bytes or control characters detected')\n    if (/^[a-zA-Z]:\\\\/.test(basePath)) throw new Error('Invalid SQLite path: Windows absolute paths are not allowed')\n    if (/^\\\\\\\\[^\\\\]/.test(basePath)) throw new Error('Invalid SQLite path: UNC paths are not allowed')\n    if (/^\\\\\\\\\\?\\\\/.test(basePath)) throw new Error('Invalid SQLite path: extended-length paths are not allowed')\n\n    const resolvedPath = path.isAbsolute(basePath) ? path.resolve(basePath) : path.resolve(path.join(defaultDir, basePath))\n\n    if (resolvedPath.includes('..')) throw new Error('Invalid SQLite path: path traversal detected in resolved path')\n\n    if (!isPathWithinAllowedSQLiteDirs(resolvedPath, allowedDirs)) {\n        throw new Error(\n            `Invalid SQLite path: path must be within allowed directories (${allowedDirs.join(', ')}). Attempted path: ${resolvedPath}`\n        )\n    }\n\n    return resolvedPath\n}\n\n/**\n * Restricts SQL executed against a SQLite database opened via validateSQLitePath to a","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/src/validator.ts#L326-L362","documentation":"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.","triggerScenarios":"A Database Path like 'C:\\\\Users\\\\me\\\\app.db' or 'D:\\\\data\\\\db.sqlite' is supplied to a Sql Database node.","commonSituations":"Windows developers pasting local paths; configs shared across OSes; CI running Linux against Windows-authored configs.","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."],"exampleFix":"// before\nnodeParams.databasePath = 'C:\\\\flowise\\\\app.db'\n\n// after\nnodeParams.databasePath = 'app.db'   // -> ~/.flowise/app.db","handlingStrategy":"validation","validationCode":"if (/^[a-zA-Z]:\\\\/.test(String(databasePath ?? ''))) throw new Error('Windows drive path not allowed; use POSIX');","typeGuard":"const isPosixPath = (p: unknown): p is string => typeof p === 'string' && !/^[a-zA-Z]:[\\\\/]/.test(p);","tryCatchPattern":"try { validateSQLitePath(databasePath) } catch (e) { if (e instanceof Error && /Windows absolute/.test(e.message)) { databasePath = 'database.sqlite' } else throw e }","preventionTips":["Normalize Windows paths to POSIX for cross-platform deploy.","Prefer simple filenames.","Reject drive-letter paths in committed configs via CI."],"tags":["path-traversal","security","validation","windows","cross-platform","sqlite","database","flowise"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}