AAK-MCP-FLOWISE-CVE-2026-91931-001: flowise below 3.1.4 (Custom MCP node reaches RCE through npx package names and an unvalidated cwd)
- Severity
- HIGH
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
FlowiseCustomMcpNodeRce
What it detects
Flowise (flowise, npm) before 3.1.4 allows an authenticated attacker to reach remote code execution through the Custom MCP node by two routes closed in the same release. Supplying npx package names in the mcpServerConfig parameter causes Flowise to invoke npx on attacker-controlled npm packages, running their install and entry-point code on the Flowise server (CVE-2026-91931, CVSS 8.5, CWE-78). Separately, the path validation applied to mcpServerConfig is bypassed by passing a clean filename in the args array while controlling the cwd parameter, so the resolved executable is taken from an attacker-chosen working directory (CVE-2026-91932, CVSS 8.5, CWE-20). Both are fixed in 3.1.4.
How to fix
Upgrade flowise to >= 3.1.4 and pin it. Treat the Custom MCP node's mcpServerConfig as untrusted input even from authenticated users: allowlist the commands it may launch rather than validating the filename alone, and resolve them against a fixed directory instead of a caller-supplied cwd. Restrict who holds Flowise credentials, since both paths require only an authenticated session.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-FLOWISE-CVE-2026-91931-001
Limitations
Reads flowise in package.json, .mcp.json, mcp.json, claude_desktop_config.json and the package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles at the project root only, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (packages/app/package.json) or in a lockfile format the reader does not parse (a Yarn 2+ yarn.lock). The flowiseai/flowise image tag is not read, in a compose file or in an MCP config that starts it with docker run. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-91931, CVE-2026-91932
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP05:2025 (Command Injection & Execution)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI05 (Unexpected Code Execution (RCE))
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-AGENT-01
- CSA AI Controls Matrix (AICM): IVS-04, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-FLOWISE-CVE-2026-91931-001.md: the page then shows that text, with the registry reference appended under it.