Skip to content

AAK-MCP-NETWORKAI-CVE-2026-109331-001: network-ai 5.14.0 to 5.15.1: ClaudeHookBridge checks deny patterns against one truncated field

Severity
HIGH
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
NetworkAiHookDenyBypass

What it detects

Network-AI (network-ai on npm) ships ClaudeHookBridge, a Claude Code PreToolUse hook that blocks tool calls matching an operator's denyPatterns. It checks the patterns against the first candidate field present in the tool input only, so an agent steered by prompt injection puts the payload in another field, such as a Write tool's content or an MCP tool's script parameter, beside a harmless file_path or command, and writes a web shell or runs a script (CVE-2026-109331, CVSS 3.1 7.4, CWE-436). Before 5.15.1 it also checks only the first 500 characters of that field, while Claude Code runs all of it (CVE-2026-73614, CVSS 3.1 8.8). Checked in the npm tarballs: the bridge is absent in 5.13.4 and present from 5.14.0, 5.15.1 drops the truncation, and 5.15.2 matches the patterns against every field.

How to fix

Upgrade network-ai to 5.15.2 or later and pin it, in the hook command too (npx -y -p network-ai@5.15.2 ...). Until then, do not rely on denyPatterns alone: run the hook in enforce mode with grants, and keep Claude Code's own permission deny rules for the commands that matter.

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

agent-audit-kit scan . --rules AAK-MCP-NETWORKAI-CVE-2026-109331-001

Limitations

Reads network-ai from 5.14.0 below 5.15.2 where a project states the version: a package.json or lockfile entry, or a versioned launch in .mcp.json, mcp.json or claude_desktop_config.json. The README's hook command and plugin launch are unpinned (npx -y -p network-ai ...) and resolve to 5.15.4, which is fixed, so they are not reported, and the hook command in .claude/settings.json is not read at all, pinned or not. 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


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