A generated abstract illustration on a deep slate field: a single browser window shape at the left, drawn as an empty outline, with a thin amber line running right and terminating at a small dark port shape set into a low wall. Midway along the line, the address label it carries is drawn twice in pale grey, the second label pointing off in a different direction. A faint blueprint grid sits behind everything. No text, numbers, people, brand marks or organisation logos appear. The OrcaRouter logo is composited in the bottom-right corner.
AI Safety Incidents

DNS rebinding protection was off by default in the MCP TypeScript SDK

Author

Elias Hawthorne

Date Published

Latest models · 20View all models →
Benchmarks: Artificial Analysis · updated daily
Back to all posts

A web page the user never chose to trust could reach a Model Context Protocol server running on their own machine and invoke its tools, because the official TypeScript SDK for the protocol left DNS rebinding protection switched off unless a developer turned it on. The flaw is CVE-2025-66414, published by GitHub's advisory database on 2 December 2025 and scored 8.1 by NIST's National Vulnerability Database, affecting @modelcontextprotocol/sdk before version 1.24.0 — specifically HTTP servers built on StreamableHTTPServerTransport or SSEServerTransport, running on localhost without authentication. The archive files it in December 2025 as a vulnerability rather than an incident, at confidence A, with no real harm recorded: a flaw that was found, not one shown to have been used. The record, with the archive's own severity and confidence grades, sits in the Orca AI Incident Archive alongside the other MCP vulnerabilities filed there.

What the flaw actually allows

The GitHub advisory, GHSA-w48q-cv73-mx4w, sets out the preconditions precisely: an HTTP-based MCP server, built on StreamableHTTPServerTransport or SSEServerTransport, running on localhost without authentication, and with no enableDnsRebindingProtection flag set. In that configuration the advisory states that "a malicious website could exploit DNS rebinding to bypass same-origin policy restrictions and send requests to the local MCP server," and that this "could allow an attacker to invoke tools or access resources exposed by the MCP server on behalf of the user in those limited circumstances."

The mechanism is old and does not depend on a bug in any browser. A page served from a hostname the attacker controls is allowed to talk to that hostname; the attacker then re-resolves the same name to 127.0.0.1, so the browser's origin check still passes while the requests land on the machine in front of the user. Validating the Host header defeats it, because a rebound request still carries the attacker's hostname rather than localhost — which is precisely what the fix implements. The advisory classifies the weakness as CWE-1188, insecure default initialization of a resource: the defence existed in the SDK, but nothing switched it on.

Two exclusions matter for anyone counting exposure. The advisory states the issue does not affect servers using stdio transport, which is how most locally launched MCP servers connect, and it states that running HTTP-based MCP servers locally without authentication "is not recommended per MCP security best practices." The protocol specification's transport section is stricter still, requiring servers to validate the Origin header on all incoming connections and to answer 403 when an Origin is present and invalid, recommending that local servers bind only to 127.0.0.1, and recommending authentication on all connections. The SDK's default did not meet the first of those requirements.

Three grades for one flaw

The record's summary quotes 8.1, and that figure is NVD's. NVD's entry, with vulnerability status "Analyzed," carries CVSS 3.1 base score 8.1, high, vector AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N, marked as the primary score. GitHub, which is the CVE Numbering Authority for this identifier, scores the same flaw under CVSS 4.0 at 7.6, also high, with attack requirements present and user interaction passive. The two numbers differ because the frameworks measure different things; they are not a disagreement about the bug.

A self-built HTML card headed 'CVE-2025-66414 · one flaw, five published judgements' and titled 'No two authorities grade it the same way, and none of them say it was exploited', with a lead line reading 'The record quotes 8.1. That is NIST's score. GitHub scores the same flaw 7.6 under a different framework, and the archive grades the entry medium on its own scale.' Six rows follow, each pairing a figure, what it measures, who published it and when: 8.1, CVSS 3.1, high, base score with vector AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N, marked primary in an entry whose vulnerability status is Analyzed, NIST National Vulnerability Database, 2 December 2025; 7.6, CVSS 4.0, high, base score with attack requirements present and user interaction passive, published by GitHub as the CVE Numbering Authority, listed as a secondary metric in NVD's entry, 2 December 2025; medium, the archive's own severity field, described as an editorial grade applied across its dataset and not a CVSS band, Orca AI Incident Archive, December 2025; none, CISA SSVC decision points exploitation none, automatable no, technical impact total, republished inside NVD's entry, 2 December 2025; 0.00544, FIRST EPSS, 46th percentile, probability of exploitation in the next 30 days, 17 November 2026; and false, the archive's real harm field, with no exploitation, victim or incident recorded in the entry and the record's kind given as vulnerability rather than incident, Orca AI Incident Archive, December 2025. A footer reads 'Sources: NVD entry for CVE-2025-66414, status Analyzed, published 2 December 2025; GitHub advisory GHSA-w48q-cv73-mx4w; MITRE CVE record, assigner GitHub_M; FIRST EPSS API as of 17 November 2026; Orca AI Incident Archive. The archive's severity field is its own classification and is not derived from either CVSS score.' The OrcaRouter logo is composited in the bottom-right corner.

The archive's own grade for the record is medium, which is lower than either scoring body's high. An archive severity field is an editorial classification applied across a whole dataset, not a CVSS band, and this piece reports the three rather than reconciling them. What the record does state unambiguously is real_harm false, and nothing found for this article contradicts it. NVD republishes CISA's SSVC assessment of the CVE with exploitation "none" and automatable "no". FIRST's Exploit Prediction Scoring System gives 0.00544, the 46th percentile, as of 17 November 2026 — a low but not negligible probability of exploitation in the next 30 days, which is roughly what an unweaponised localhost flaw looks like.

The protection existed for five months, switched off

The default was a deliberate choice, and the repository shows its author saying so. Pull request 565, opened by ddworken and merged on 27 June 2025, implemented the protections "per spec" but stated: "To avoid breaking existing applications this doesn't enable any changes by-default, but enabling this feature is heavily encouraged for any local MCP servers using the SSE transport." The same description adds: "Ideally we should find a way to enable them by default. But for now, adding them as disabled is a good first step." That code shipped in version 1.14.0 on 3 July 2025, so enableDnsRebindingProtection was available, documented and off for roughly five months before 1.24.0.

A self-built HTML card headed 'The same protection, five months apart' and titled 'Everything the fix does existed as an opt-in already — the change was the default', with a lead line reading 'The record is month-precision: December 2025. Every date below is a timestamp published by the source named on the row.' Eight timestamped rows follow: 27 June 2025, pull request 565, DNS rebinding protections implemented per spec and explicitly disabled by default to avoid breaking existing applications, GitHub repository, PR 565 by ddworken; 3 July 2025, version 1.14.0 published, enableDnsRebindingProtection ships in the SDK defaulting to false, with the same description adding that ideally the maintainers should find a way to enable them by default, npm registry; 25 November 2025, version 1.23.0 published, the last release before the fix, with no createMcpExpressApp helper and no host-header middleware anywhere in the unpacked package, npm registry and package contents; 28 November 2025, CVE-2025-66414 reserved, with GitHub_M as the numbering authority, MITRE CVE record; 2 December 2025 13:47 UTC, version 1.24.0 published, adding createMcpExpressApp, hostHeaderValidation and localhostHostValidation plus a DNS rebinding section in the server docs, npm registry; 2 December 2025 16:51 UTC, advisory GHSA-w48q-cv73-mx4w published, with the transport-level flag still defaulting to false, GitHub advisory; 2 December 2025 18:12 UTC, CVE record published, with NVD's analyzed entry following at 19:15 UTC with an 8.1 score, MITRE and NVD; and 17 November 2026, EPSS 0.00544, 46th percentile, with no exploitation recorded by CISA's SSVC assessment in the same period, FIRST EPSS. A footer reads 'Sources: GitHub pull request 565 and its description; npm registry publish timestamps for @modelcontextprotocol/sdk 1.14.0, 1.23.0 and 1.24.0; the 1.23.0 tarball as published; the advisory and the MITRE CVE record; FIRST EPSS. The record's own date is a month, not a day.' The OrcaRouter logo is composited in the bottom-right corner.

There was a second, quieter problem with the opt-in. In the shipped code, even with the flag set to true, the transport only validated a Host header if allowedHosts had been configured and an Origin header if allowedOrigins had been configured — with both lists empty, the validation function returned cleanly without checking anything. Turning the switch on, in other words, did nothing unless allowlists were supplied as well. A pull request opened on 16 August 2026, number 2676, describes exactly this as a "fail-open" and proposes treating an unset flag as enabled; it was still open when this article was written.

What 1.24.0 changed, and what it left alone

Version 1.24.0, published to npm at 13:47 UTC on 2 December 2025, adds a helper rather than changing the transport default. createMcpExpressApp() builds an Express app whose default host is 127.0.0.1 and which applies localhostHostValidation() automatically whenever the host is 127.0.0.1, localhost or ::1; it accepts an allowedHosts list for custom hostnames and logs a warning when bound to 0.0.0.0 or :: without one. The same release exports hostHeaderValidation(allowedHostnames), the middleware behind it, which parses the Host header through the URL API so that IPv6 literals work and answers a 403 JSON-RPC error when the hostname is not on the list. The server documentation gained a DNS rebinding section the same day.

What it did not change is the transport. In 1.24.0 the streamable HTTP transport still reads enableDnsRebindingProtection with a default of false, and the SSE transport still constructs with "enableDnsRebindingProtection: false" when given no options. The 1.32.2 tarball on npm, unpacked for this article, still carries enableDnsRebindingProtection defaulting to false in the web-standard streamable HTTP transport. So an application that builds its own Express server the old way gets no protection from upgrading — the advisory says as much, directing users with custom Express configurations to update and then apply hostHeaderValidation() themselves. The secure path exists and is one function call; it is not something the version bump does for you.

A separate pull request merged the same day, number 1205 by jacopoc, corrected the Origin check to match the 2025-11-25 specification, which requires rejecting only an Origin header that is present and invalid. That matters for non-browser clients, which send no Origin at all and had been rejected when protection was on.

The gap did not close entirely with the advisory. A contributor's static review of the public source, filed as issue 2843 on 22 September 2026, states that createMcpExpressApp applies Host and Origin checks only for loopback hosts and warns only for 0.0.0.0 and ::, so a server bound to a LAN address or a container hostname gets neither the checks nor the warning; the issue says no traffic was sent to any MCP environment and offers no proof of concept. That is an open report, not a confirmed defect, and it is about non-loopback binds rather than the localhost case this CVE covers.

What corroborates it, and what does not

Corroboration here is real but narrow in kind. NVD analysed the CVE and assigned its own 3.1 score; MITRE's CVE record was reserved on 28 November 2025 and published on 2 December 2025 with GitHub_M as the numbering authority; OSV distributes the same entry with the same affected range and the same fix commit. Those are four databases, but they are all reading one vendor advisory, and they agree with it on the affected range — every version before 1.24.0 — and on the patch, commit 09623e2, which was merged on 2 December 2025 and adds the helper, the middleware and the documentation section.

Independent reporting is, as far as this article could establish, absent. A G​oogle News search for the CVE identifier and a second for the advisory identifier returned no articles. The Hacker News returned nothing for this identifier, and its rebinding coverage reaches Ray and older client software rather than this SDK. That is not a contradiction of the record; it is the reason the record's confidence A rests on primary sources agreeing rather than on anyone having independently reproduced the attack. The advisory does not name who originally reported the issue; GitHub's API lists JLLeitschuh as an analyst credited on it. No proof of concept was published with the advisory and none was found.

What "AI involvement" rests on here

The record marks AI involvement confirmed, and in this case the connection is structural rather than behavioural: the affected package is the official TypeScript SDK for the Model Context Protocol, the interface through which AI applications call external tools and read external resources. A server exposed this way is one whose tools an assistant can be told to use, so what a rebound request reaches is the same tool surface the model reaches. Nothing in the advisory, in NVD's entry or in the repository suggests a model wrote the vulnerable code, chose the insecure default or carried out an attack. The flaw was introduced by a human maintainer who documented the trade-off in a pull request, and it was closed by human maintainers five months later.

Established, and not

• Established: that @modelcontextprotocol/sdk before 1.24.0 shipped HTTP server transports with DNS rebinding protection defaulting to off; that this left unauthenticated localhost MCP servers reachable from a malicious web page; that the protection had been available as an opt-in since 1.14.0 in early July 2025; and that 1.24.0 added a helper and middleware that make the secure configuration the default for localhost bindings. The advisory, NVD, MITRE and OSV agree on all of this.

• Established, and worth separating from the grade: that no exploitation is recorded. The archive's real_harm field is false, CISA's SSVC assessment as republished by NVD records exploitation "none", and EPSS puts 30-day exploitation probability at 0.00544. A CVSS score of 8.1 describes what the flaw would permit, not what happened.

• Not established: that anyone was attacked through it. No victim, no campaign, no incident report and no scan result appears in any source consulted. The record's own kind field says the same thing — a vulnerability that was found, not necessarily exploited.

• Reported, not confirmed: that the residual gaps described above are exploitable. The fail-open behaviour with empty allowlists is visible in the shipped source, but the later report about non-loopback binds is one contributor's static reading, filed as an issue, with no reproduction offered and no maintainer determination attached to it.

A generated abstract illustration on a deep slate field: a low dark wall runs across the lower third of the frame with a single small lit opening in it. Above the wall, a pale translucent layer of thin horizontal lines sits slightly askew, as if an envelope had been lifted and replaced at a different angle. A thin amber line passes through the opening and stops just short of it. A faint blueprint grid sits behind everything. No text, numbers, people, brand marks or organisation logos appear. The OrcaRouter logo is composited in the bottom-right corner.

The interesting part of this record is not the score, which two authorities state differently and neither calls critical. It is the five-month gap between a maintainer writing "ideally we should find a way to enable them by default" and the default actually changing — and the fact that even after the advisory, the transport-level flag still defaults to off, so the fix reaches only the developers who read the advisory and adopt the new helper.