Skip to content

AAK-MCP-CONTENTFUL-CVE-2026-53957-001: @contentful/mcp-server below 1.7.19 / @contentful/mcp-tools below 0.4.5 (LLM-controlled host and proxy carry the management token)

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

What it detects

Contentful's MCP server exposes host, proxy, rawProxy and insecure as tool arguments on export_space and import_space (packages/mcp-tools/src/tools/jobs/space-to-space-migration/), and combines them with the server's own CONTENTFUL_MANAGEMENT_TOKEN. Once space_to_space_migration_handler has enabled the migration tools, a direct MCP call — or prompt injection through Contentful content an attacker can write — redirects Management API requests, and the Authorization header riding on them, to a host or proxy of the attacker's choosing. The disclosed token is a personal access token, so it grants out-of-band access to every space in its scope until it is rotated; upgrading does not undo that. Tools built through createToolClient pin the host from server configuration and are unaffected, which is what makes this a property of the two migration tools rather than of the server (CVE-2026-53957, CVSS 7.7, CWE-918). Fixed in @contentful/mcp-server 1.7.19 and @contentful/mcp-tools 0.4.5 — two packages on two version lines, so this rule carries a pin for each.

How to fix

Upgrade @contentful/mcp-server to >= 1.7.19 and @contentful/mcp-tools to >= 0.4.5, and pin both. Rotate the Contentful management token if an affected version ever ran with the migration tools enabled: the upgrade closes the redirect, it does not retract a token already sent elsewhere. Where you build similar tools, take the API host from server configuration and never from a tool argument — a destination an LLM can choose is a destination an attacker can choose.

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

agent-audit-kit scan . --rules AAK-MCP-CONTENTFUL-CVE-2026-53957-001

Limitations

Reads @contentful/mcp-server and @contentful/mcp-tools, each against its own fix floor, 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), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (a Yarn 2+ yarn.lock). 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-CONTENTFUL-CVE-2026-53957-001.md: the page then shows that text, with the registry reference appended under it.