{"record":{"id":"488e542478936867","repo":"FlowiseAI/Flowise","slug":"invalid-path-extended-length-paths-are-not-allowe","errorCode":null,"errorMessage":"Invalid path: Extended-length paths are not allowed","messagePattern":"Invalid path: Extended-length paths are not allowed","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/src/validator.ts","lineNumber":252,"sourceCode":"    if (basePath.toLowerCase().includes('%2e') || basePath.toLowerCase().includes('%2f') || basePath.toLowerCase().includes('%5c')) {\n        throw new Error('Invalid path: encoded path traversal attempt detected')\n    }\n\n    // Check for null bytes and control characters\n    if (/\\0/.test(basePath) || /[\\x00-\\x1f]/.test(basePath)) {\n        throw new Error('Invalid path: null bytes or control characters detected')\n    }\n\n    // Check for Windows-specific absolute paths and UNC paths (even on Unix systems)\n    // This prevents cross-platform attack vectors\n    if (/^[a-zA-Z]:\\\\/.test(basePath)) {\n        throw new Error('Invalid path: Windows absolute paths are not allowed')\n    }\n    if (/^\\\\\\\\[^\\\\]/.test(basePath)) {\n        throw new Error('Invalid path: UNC paths are not allowed')\n    }\n    if (/^\\\\\\\\\\?\\\\/.test(basePath)) {\n        throw new Error('Invalid path: Extended-length paths are not allowed')\n    }\n\n    // Resolve to absolute path\n    // If path is relative, resolve it relative to the .flowise directory (safe default)\n    // If path is already absolute, keep it as-is\n    let resolvedPath: string\n    if (path.isAbsolute(basePath)) {\n        resolvedPath = path.resolve(basePath)\n    } else {\n        // Relative paths are resolved within the .flowise directory for safety\n        resolvedPath = path.resolve(path.join(getUserHome(), '.flowise', basePath))\n    }\n\n    // Verify the resolved path doesn't contain '..' after resolution\n    if (resolvedPath.includes('..')) {\n        throw new Error('Invalid path: path traversal detected in resolved path')\n    }\n","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/src/validator.ts#L234-L270","documentation":"Thrown by validateVectorStorePath (packages/components/src/validator.ts:252) when the base path matches ^\\\\\\\\\\?\\\\ — a Windows extended-length path such as '\\\\\\\\?\\\\C:\\\\Very\\\\Long\\\\Path'. These bypass MAX_PATH limits and several normalization rules, so Flowise rejects them.","triggerScenarios":"A node config contains an extended-length path prefix, typically copied from PowerShell or a tool that emits '\\\\\\\\?\\\\' prefixes for long paths.","commonSituations":"Long Windows paths auto-prefixed by tooling; PowerShell Get-Item outputs; migration of deep directory trees into Flowise.","solutions":["Drop the '\\\\\\\\?\\\\' prefix and use a plain path under an allowed dir.","Shorten the directory structure so no extended-length prefix is needed.","Move the data under ~/.flowise and use a short relative name."],"exampleFix":"// before\nbasePath = '\\\\\\\\?\\\\C:\\\\Users\\\\me\\\\deep\\\\...\\\\vectors'\n\n// after\nbasePath = 'vectors'   // moved under ~/.flowise/vectors","handlingStrategy":"validation","validationCode":"if (/^\\\\\\\\\\?\\\\/.test(String(basePath ?? ''))) throw new Error('extended-length path prefix not allowed');","typeGuard":"const isNotExtendedLength = (p: unknown): p is string => typeof p === 'string' && !/^\\\\\\\\\\?\\\\/.test(p);","tryCatchPattern":"try { validateVectorStorePath(basePath) } catch (e) { if (e instanceof Error && /Extended-length/.test(e.message)) { basePath = basePath.replace(/^\\\\\\\\\\?\\\\/, '') } else throw e }","preventionTips":["Strip the '\\\\\\\\?\\\\' prefix before passing paths to Flowise.","Shorten deep directory trees to avoid the prefix entirely.","Use relative names under ~/.flowise."],"tags":["path-traversal","security","validation","windows","extended-length-path","vector-store","flowise"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}