ReDoS Vulnerability in Anthropic's MCP TypeScript SDK - @modelcontextprotocol/sdk

@modelcontextprotocol/sdk Updated 06 Jan 2026

Summary

05/01/2026
HIGH
No i
High
8.7

GHSA-8r9q-7v3j-jr4g: Anthropic's MCP TypeScript SDK has a ReDoS vulnerability. Affects @modelcontextprotocol/sdk versions < 1.25.1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @modelcontextprotocol/sdk is a TypeScript SDK developed by Anthropic, designed to facilitate interactions with the Model Context Protocol (MCP). This SDK allows developers to build applications that can effectively communicate with various AI models. It is widely used for its ease of integration and robust functionality. However, versions up to and including 1.25.1 are vulnerable to a ReDoS attack, which can severely impact application performance.

Vulnerability Detail

Anthropic's MCP TypeScript SDK versions up to and including 1.25.1 contain a regular expression denial of service (ReDoS) vulnerability in the UriTemplate class. This vulnerability arises from the use of nested quantifiers in a dynamically generated regular expression during URI matching. When processing RFC 6570 exploded array patterns, specially crafted inputs can trigger catastrophic backtracking, leading to excessive CPU consumption. An attacker can exploit this vulnerability by supplying a malicious URI, causing the Node.js process to become unresponsive and resulting in a denial of service.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can implement input validation to sanitize URIs before processing them with the SDK. This can help mitigate the risk of triggering the ReDoS vulnerability. For example, you can use a simple regex to validate the structure of the URI before passing it to the UriTemplate class.

Conclusion

The ReDoS vulnerability in Anthropic's MCP TypeScript SDK poses a significant risk to applications using affected versions. It is crucial to update to the latest version to mitigate this risk. Additionally, implementing input validation can serve as a temporary workaround while transitioning to the patched version.

See every vulnerability recorded for @modelcontextprotocol/sdk →

Share this vulnerability

FAQ

A ReDoS (Regular Expression Denial of Service) vulnerability occurs when a regular expression takes an excessive amount of time to evaluate, often due to nested quantifiers, leading to denial of service.

An attacker can exploit this vulnerability by sending specially crafted URIs, causing your application to become unresponsive and leading to a denial of service.

The vulnerability affects all versions of the @modelcontextprotocol/sdk up to and including 1.25.1.

Yes, a patched version (1.25.2 and later) is available. It is recommended to update to this version to mitigate the vulnerability.

You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just your package-lock.json file. You can also check if your application is affected by this vulnerability using the Vulert playground without any signup.

Related vulnerabilities

Recent vulnerabilities recorded for @modelcontextprotocol/sdk.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback