Skip to content

AAK-NEO4J-001: mcp-neo4j-cypher below 0.6.0 APOC read-only bypass

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

What it detects

A dependency pin targets mcp-neo4j-cypher earlier than 0.6.0, or source code sets read_only=True while issuing CALL apoc.* / db.cypher.runWrite procedures. CVE-2026-35402 (CVSS 2.3 LOW, but integrity-critical) lets attackers bypass the read-only mode and execute arbitrary writes or SSRF.

How to fix

Upgrade mcp-neo4j-cypher to 0.6.0 or later. In source code, stop relying on read_only=True as a security boundary when APOC procedures are in scope; deny-list apoc.* at the query layer.

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-NEO4J-001

Limitations

The pin reads requirements.txt, requirements-dev.txt, requirements-prod.txt, dev-requirements.txt and pyproject.toml at the project root, taking the lowest version a range allows. A git reference or an archive is judged by the release its tag or file name names, with releases compared on their first three numbers, so a pre-release of the fix (v0.6.0-rc1) reads as the fix. An unpinned line, a git reference to a commit or a branch included (any name holding a / but refs/tags/<tag>), is not reported, and uv.lock, requirements/base.txt and a uvx mcp-neo4j-cypher==0.5.0 --read-only launcher in .mcp.json are not read, nor is a pyproject.toml that does not parse or a manifest over 2 MB. A pyproject.toml with a key of more than 64 dotted parts, or holding an integer Python cannot convert (one past 4,300 digits), is refused and reported as AAK-INTERNAL-SCANNER-FAIL. Declarations of one install that no release satisfies together (mcp-neo4j-cypher==0.6.0 beside mcp-neo4j-cypher==0.5.0 in one requirements file) admit nothing and are not reported; pip refuses to install them too. The source arm needs read_only = True and a CALL apoc. or runWrite reference in the same Python file, so a query kept in another module is not matched. A requirements file over 2 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-NEO4J-001.md: the page then shows that text, with the registry reference appended under it.