Contentful MCP Server advisory: two migration tools let a model redirect the server's access token to any host
CVE-2026-53957 and GHSA-2xhg-73j7-rrgx, published 2026-08-19 at CVSS 7.7 high. The export_space and import_space tools spread LLM-controlled arguments, host and proxy among them, into the options passed to contentful-export, so the Management API client built its base URL from an attacker-supplied host and attached the server's Personal Access Token as a bearer header. Fixed 2026-06-01, eleven weeks before the record.
An advisory published on 2026-08-19 for Contentful's first-party MCP server records CVE-2026-53957, a CWE-918 server-side request forgery rated 7.7 high. Its interest is less the class than the path: two tools handed a model direct control of where the server sent its own credentials.
The export_space and import_space tools spread their incoming arguments
into the options object passed to contentful-export and
contentful-import. Those options travel to the Contentful Management API
SDK, which builds its baseURL from the host value and attaches the
server's Management API Personal Access Token as an Authorization: Bearer
header on every outgoing request. Because host and proxy were accepted
from the tool call, a caller who could invoke the tool, or who could inject
instructions into Contentful content the model read, could point all
Management API traffic and the token at an endpoint of their choosing. The
tools' own Zod schema advertised host, proxy, rawProxy and insecure
to the model as ordinary optional parameters.
The advisory is precise about why the rest of the server was unaffected,
and that detail is the useful part. All forty-plus regular tools obtain
their client through createToolClient, which pins
host: config.host ?? 'api.contentful.com' so the model cannot override
it. Only these two diverged, calling a helper that extracted the access
token and discarded the configured host, then spreading the raw arguments
on top. The CONTENTFUL_HOST environment variable was never applied to the
export options at all. Both tools are also registered disabled by default,
so the documented trigger needs an enabling call first.
The remedy, in pull request #376, was to remove host, proxy and
headers from both tool schemas rather than to validate them. It merged on
2026-06-01 and shipped the same day in mcp-server@1.7.19 and
mcp-tools@0.4.5, eleven weeks before the advisory was published. Current
releases are mcp-server@1.16.0 and mcp-tools@0.12.6, both from
2026-08-18, so anyone tracking releases received the fix well before the
record described the problem.
How was this verified, and what are the sources?
Published · last verified · confidence 1.00.
- GHSA-2xhg-73j7-rrgx, published 2026-08-19T19:17:00Z, CVE-2026-53957, high, CVSS 3.1 7.7 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N), CWE-918 - states export_space and import_space in @contentful/mcp-tools "accept LLM-controlled host and proxy parameters that are spread directly into the options object passed to contentful-export / contentful-import", that the CMA SDK "builds baseURL from host and attaches the server's CMA Personal Access Token as Authorization: Bearer <PAT> on every outgoing request", and that an attacker "who can invoke MCP tools, or inject instructions into Contentful content the LLM reads, can redirect all CMA requests - and the PAT - to an attacker-controlled endpoint"; names createClientConfig as extracting only accessToken while discarding config.host, states the CONTENTFUL_HOST environment variable "is never applied to exportOptions", quotes the Zod schema exposing host, proxy, rawProxy and insecure, and states all 40+ regular tools call createToolClient which enforces host: config.host ?? 'api.contentful.com' so "the LLM cannot override this value"; affected npm @contentful/mcp-server < 1.7.19 and @contentful/mcp-tools < 0.4.5; the documented trigger requires first enabling the tools, which register.ts registers disabled by default - accessed
- contentful-mcp-server pull request #376 "fix: remove host/proxy/headers from export_space and import_space tool schemas [DX-1177]", merged 2026-06-01T16:01:30Z as commit fa7477ee48515f4248bc91a025eab0ca83423fe0 - the fix named in the advisory's references, showing the remedy was removal of the parameters from the tool schemas rather than validation of them - accessed
- contentful-mcp-server releases - mcp-server@1.7.19 and mcp-tools@0.4.5 both published 2026-06-01, eleven weeks before the advisory; the current releases are mcp-server@1.16.0 and mcp-tools@0.12.6, both published 2026-08-18, so any deployment tracking releases had the fix long before the record appeared - accessed