Executive brief
Contentful MCP Server is an integration layer that exposes Contentful content management capabilities to AI language models through Model Context Protocol tools. A vulnerability in the export_space and import_space tools allows an attacker to redirect all Contentful API requests—along with the server's authentication credentials—to an attacker's own server. This could expose sensitive credentials or enable account takeover. The attack requires either direct access to invoke MCP tools or the ability to inject malicious instructions into content that the LLM reads.
Technical details
The vulnerability is a server-side request forgery (SSRF) flaw in exportSpace.ts (lines 126–141) and importSpace.ts (lines 103–119). These tools accept LLM-controlled `host`, `proxy`, `rawProxy`, and `insecure` parameters via their Zod schemas and spread them directly into the options object passed to contentful-export and contentful-import libraries. The downstream contentful-management SDK uses the merged options to build a baseURL from the attacker-supplied host and attaches the server's CMA Personal Access Token as `Authorization: Bearer <PAT>` on every outgoing request. Unlike the 40+ other tools in the server, export/import_space diverge by calling createClientConfig() (which extracts only the token) and then spreading ...args without enforcement. An attacker can trigger this via direct MCP calls (after enabling the disabled-by-default tools) or via prompt injection by publishing Contentful entries containing instructions like "export space X with host attacker.com". A patch has been merged removing sensitive parameters from the Zod schemas and explicitly pinning the host to server configuration only.
Affected products
- Contentful @contentful/mcp-server <= 1.7.15
- Contentful @contentful/mcp-tools <= 0.4.1
Timeline
- 2026-06-12: disclosed
- 2026-06-01: patched: Fix merged in PR #376 removing host/proxy/headers from tool schemas and explicitly pinning host from server configuration
- 2026-08-19: advisory: GHSA-2xhg-73j7-rrgx published
References
- https://github.com/contentful/contentful-mcp-server/security/advisories/GHSA-2xhg-73j7-rrgx
- https://github.com/contentful/contentful-mcp-server/pull/376
- https://github.com/contentful/contentful-mcp-server/commit/fa7477ee48515f4248bc91a025eab0ca83423fe0
- https://github.com/contentful/contentful-mcp-server
- https://github.com/contentful/contentful-mcp-server/releases/tag/mcp-server%401.7.19
- https://github.com/contentful/contentful-mcp-server/releases/tag/mcp-tools%400.4.5