Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 5 min read

Two credential leaks, one release: the mcp-graphql-enhanced 5.0.0 security fix

By Jordan Schlegel (Bot2Bot Labs), written with Yuriy Chistyakov, maintainer of mcp-graphql-enhanced On November 27, 2026, Yuriy Chistyakov released version 5.0.0 of @letoribo/mcp-graphql-enhanced, an MCP server for Gra

By Jordan Schlegel (Bot2Bot Labs), written with Yuriy Chistyakov, maintainer of mcp-graphql-enhanced

On November 27, 2026, Yuriy Chistyakov released version 5.0.0 of @letoribo/mcp-graphql-enhanced, an MCP server for GraphQL APIs. It fixes two security issues, each with a published advisory, about four days after the first email.

What was wrong

The first issue, GHSA-f5jg-x6qp-4rmj, is rated high and affects versions up to 4.18.0. Bot2Bot Labs is credited as the reporter. Jordan found it by reading the code at commit 7c2dea3 (npm 4.18.0). He sent nothing to any deployment.

In HTTP mode, the server listened on all interfaces and served a GraphiQL page with the operator's configured HEADERS written into it. If those headers held an API token, anyone who could open the URL could read it. The same listener accepted unauthenticated MCP requests, so a caller could run queries with that token, and mutations when enabled. Every response allowed any origin, so a website in your browser could reach a copy running on your own machine. The README's Railway, Render, and Azure instructions led people to this setup on a public URL.

The second issue, GHSA-9826-j357-9v6x, is rated medium (CVSS 3.1 score 6.9) and affects 4.15.0 through 4.18.0. The operator's HEADERS were sent to whatever endpoint a query-graphql or introspect-schema call named, and later calls could keep going to the new host with the token. It can happen on the default stdio transport when ENDPOINT and HEADERS are set. Reaching it depends on the model being steered into that call, for example by text it reads, and on the client allowing it.

Jordan had already flagged this second issue to Yuriy by email. Plumbline then reported it independently and is the credited reporter on that advisory.

How the fix came together

Jordan wrote on November 23 to ask where to send a report, and offered a 90-day disclosure window. Yuriy turned on GitHub private vulnerability reporting the next day, and the report went in that afternoon.

The patch attached to that report added two new environment variables. It didn't ship. Yuriy wanted a small configuration surface, and the final fix adds no new env vars. The advisory body still shows the original suggested fix. Go by the shipped behavior below.

On November 25 Yuriy fixed two pieces himself. He stopped writing env.HEADERS into the GraphiQL page, so users now enter credentials in its Headers tab. He also scoped runtime headers to each request, after an interim commit on main had kept them in one shared object.

That left the question of who could reach the server. Yuriy was dealing with rolling blackouts. Bot2Bot had power and time, so Jordan offered to write the remaining patch and tests, said there was no rush, and offered to extend the window. It didn't need extending.

The first patch went up in the advisory's private fork on November 26. Yuriy ran the suite and got 25 of 26. The failure came from Windows/WSL exporting a NAME variable that overrode the server's name in a test. He also caught a TypeScript IDE complaint about the test imports. Both were fixed within the hour, and he merged that day. The header-scoping patch merged early on November 27, with 43 tests in the suite.

I like building unconventional bridgesβ€”whether that's wiring autonomous agents across Windows and WSL2 through a graph database or keeping desktop clients like mcp-graphiql working without drowning users in config flags. Fixing two advisories in four days while working between rolling blackouts in Odesa isn't exactly a calm week, so having Jordan jump in with real patches and tests instead of just tossing a report over the fence makes all the difference. Zero new env vars, strict per-request boundaries, and everything still works out of the box.

β€” Yuriy Chistyakov

The design choices

An allowlist instead of dropping CORS. Dropping CORS was the simplest fix, but it would have broken mcp-graphiql, an Electron app that runs this server as a child process and talks to it cross-origin. 5.0.0 allows localhost, 127.0.0.1, and [::1] on any port, app://, and the deployment's own origin. Other origins get a 403 on POST and preflight. On loopback the server also checks the Host header to block DNS rebinding.

No null origin. Yuriy suggested also allowing null and file://. Jordan left them out on purpose. Any website can send Origin: null from a sandboxed iframe, even to 127.0.0.1. mcp-graphiql didn't need it. Its server calls carry no Origin, and its UI loads from app://.

No new env vars. HTTP mode now binds to 127.0.0.1 by default, and to all interfaces only when PORT is set or inside Docker. Hosted deploys like Render keep working without new settings.

Scoped credentials. env.HEADERS now go only to the configured env.ENDPOINT. A per-call endpoint override stays with that one request. Redirects that would carry env.HEADERS are followed only to a configured endpoint. If your configured GraphQL URL redirects elsewhere, your headers won't follow it anymore.

What you should do

Upgrade to 5.0.0 or later. As of December 2, 5.0.2 is current on npm and the official MCP Registry. Both advisories list 5.0.0 as the patched version. Neither has a CVE.

5.0.0 is a breaking change for HTTP mode. If you relied on a public bind without PORT, or on browser access from another origin, check your setup.

A public bind still has no inbound authentication, and 5.0.0 doesn't add one. If you expose HTTP mode publicly, put it behind your platform's access controls.

If you ran 4.x in HTTP mode on a public URL with HEADERS set, consider rotating those tokens.

How the disclosure went

Jordan asked where to send details before sending any. Yuriy turned on private reporting the day he replied. The findings stayed private until the fix and advisories were out. Yuriy fixed what he could the same day and held the release so a second report could close in it too. When the blackouts hit, Jordan wrote the remaining patch because Bot2Bot had power, and Yuriy still reviewed every change and ran the tests. The v5.0.0 release thanks both Jordan and the Plumbline Security Research team.

If you maintain an MCP server, turning on private vulnerability reporting early saves a round trip.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.