CVE-2026-0621: MCP TypeScript SDK UriTemplate Exploded Array Pattern ReDoS

Published Jan 5, 2026
·
Updated

Impact

A ReDoS vulnerability in the UriTemplate class allows attackers to cause denial of service. The partToRegExp() function generates a regex pattern with nested quantifiers (([^/]+(?:,[^/]+))) for exploded template variables (e.g., {/id}, {?tags}), causing catastrophic backtracking on malicious input.

Who is affected: MCP servers that register resource templates with exploded array patterns and accept requests from untrusted clients.

Attack result: An attacker sends a crafted URI via resources/read request, causing 100% CPU utilization, server hang/crash, and denial of service for all clients.

Affected Versions

All versions of @modelcontextprotocol/sdk prior to the patched release.

Patches

v1.25.2 contains b392f02ffcf37c088dbd114fedf25026ec3913d3 the fix modifies the regex pattern to prevent backtracking.

Workarounds

- Avoid using exploded patterns ({/id}, {?tags}) in resource templates - Implement request timeouts and rate limiting - Validate URIs before processing to reject suspicious patterns

Other sources

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 when processing RFC 6570 exploded array patterns. The dynamically generated regular expression used during URI matching contains nested quantifiers that can trigger catastrophic backtracking on specially crafted inputs, resulting in excessive CPU consumption. An attacker can exploit this by supplying a malicious URI that causes the Node.js process to become unresponsive, leading to a denial of service.

NVD

Affected Software

3 affected componentsFixes available
npm/@anthropic/mcp-typescript-sdk<=1.25.1
npm/@modelcontextprotocol/sdk<1.25.2
1.25.2
Lfprojects Mcp Typescript Sdk<=1.25.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@modelcontextprotocol/sdk to a version that resolves this vulnerability.

    Fixed in 1.25.2
  2. Upgrade

    Upgrade @modelcontextprotocol/sdk to a version that resolves this vulnerability.

    Fixed in 1.25.2Patch b392f02ffcf37c088dbd114fedf25026ec3913d3
  3. Configuration

    Update MCP resource templates to avoid exploded array patterns in URI templates (e.g., do not use "{/id*}" or "{?tags*}"), since these cause UriTemplate to generate regexes with nested quantifiers that are vulnerable to ReDoS.

    MCP resource templates (UriTemplate) Resource template exploded array patterns (RFC 6570) = avoid patterns like "{/id*}" and "{?tags*}"
  4. Compensating control

    Implement request timeouts and rate limiting, and validate URIs before processing to reject suspicious patterns.

Event History

Jan 5, 2026
CVE Published
via MITRE·08:57 PM
Data Sourced
via MITRE·08:57 PM
DescriptionWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
Affected Software
Advisory Published
via GitHub·09:30 PM
Data Sourced
via GitHub·09:30 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-0621?

CVE-2026-0621 is considered a moderate severity vulnerability due to its potential for denial of service attacks.

2

How do I fix CVE-2026-0621?

To fix CVE-2026-0621, update the Anthropic MCP TypeScript SDK to version 1.25.2 or later.

3

What is the nature of the vulnerability in CVE-2026-0621?

CVE-2026-0621 is a regular expression denial of service (ReDoS) vulnerability that affects URI matching in the UriTemplate class.

4

What versions are affected by CVE-2026-0621?

CVE-2026-0621 affects all versions of the Anthropic MCP TypeScript SDK up to and including 1.25.1.

5

Can CVE-2026-0621 be exploited by an unprivileged user?

Yes, CVE-2026-0621 can be exploited by an unprivileged user, potentially leading to denial of service.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203