Skip to content

AAK-FLOWISE-001: Flowise below 3.1.2 MCP adapter authenticated RCE

Severity
CRITICAL
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/stdio_injection.py
Auto-fixable
Yes. agent-audit-kit fix can apply it.
SARIF name
FlowiseMcpAdapterRce

What it detects

Package manifest depends on flowise or flowise-components at version < 3.1.2, and/or a Flowise flow config (.flowise/*.json, flows/*.json) declares an MCP adapter node with customFunction or runCode sinks. The Custom-MCP feature is a recurring RCE class: CVE-2026-40933 (GHSA-c9gw-hvqq-f33r, CVSS 10.0) lets an authenticated attacker combine allowlisted commands like npx with execution flags such as -c for arbitrary OS command execution; CVE-2025-71336 (< 3.0.6, CVSS 9.8) is an unsandboxed RCE in the same feature; CVE-2026-56274 (< 3.1.2, CVSS 9.9) adds OS command injection via incomplete command-flag validation plus a regex bypass in local file-access restrictions; CVE-2026-58057 (< 3.1.3, CVSS 5.0) validates Custom-MCP stdio env vars against a case-sensitive denylist, so on Windows (case-insensitive env names) node_options slips past the NODE_OPTIONS entry and reaches NODE_OPTIONS --require code execution. CVE-2026-69263 (< 3.1.3, CVSS 8.7) is the same denylist-bypass class one step on: the denylist matched exact env-var names, but npm_config_yes=true reproduces npx --yes auto-install-and-execute without using a blocked flag; CVE-2026-69257 (< 3.1.3, CVSS 7.6) is a separate SSRF where httpSecurity.ts did not normalise IPv4-mapped IPv6 (::ffff:127.0.0.1), letting the MCP tool path reach loopback / cloud-metadata endpoints. Pin floor is 3.1.3 (highest fixed version) so 3.0.6–3.1.2 are still flagged. Same architectural class as Ox's original STDIO disclosure (see AAK-STDIO-001).

How to fix

Upgrade flowise and flowise-components to 3.1.3 or later. Audit every MCP adapter node in your flow configs; remove customFunction/runCode sinks unless they're validated against a strict argv allowlist, and treat env-var denylists as case-insensitive. See also AAK-STDIO-001 for the architectural-class detector.

agent-audit-kit fix can apply this change for you; add --dry-run to preview it.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-FLOWISE-001

Limitations

The version arm reads flowise and flowise-components under dependencies, devDependencies and peerDependencies of the root package.json only, and reports a range that admits a version below 3.1.3, or a spec that states no version. package-lock.json, yarn.lock, pnpm-lock.yaml, optionalDependencies, overrides, a sub-directory package.json, an npx flowise launcher in .mcp.json and a flowiseai/flowise image tag in a compose file are not read. The flow arm reads .flowise/*.json, flows/*.json and flows/**/*.json that mention MCP and carry a customFunction, runCode or executeCommand key, so an export saved as chatflows/export.json is not reported. A package.json over 2 MB, or a flow file over 1 MB, is not read.

References


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-FLOWISE-001.md: the page then shows that text, with the registry reference appended under it.