# fetch-mcp: IPv6 address forms slipped past its SSRF guard

> fetch-mcp trusted the private-ip library to spot internal addresses, and hex-form IPv6 literals walked straight through it.

- **Severity:** High: A working attack on a widely used AI product or ecosystem. A fix may exist. Patch or mitigate this week.
- **Category:** Vulnerability
- **Published by:** fetch-mcp
- **Disclosed:** 2026-11-30
- **CVE:** CVE-2026-141591
- **CVSS:** 9.2
- **Affects:** fetch-mcp, mcp-fetch-server (npm)
- **Research by:** zhijiewong, Shmulik Cohen
- **Primary source:** https://github.com/zcaceres/fetch-mcp/security/advisories/GHSA-rmj9-628v-jcc7
- **Page:** https://theinjection.dev/items/fetch-mcp-ssrf-guard-bypass/

fetch-mcp's SSRF guard missed IPv4-mapped IPv6 addresses, so an attacker-chosen URL could reach loopback services, internal networks and cloud metadata through any of its five fetch tools. Fixed in 1.2.0.

## What happened

The fetch-mcp maintainers published a GitHub Security Advisory on 30 November 2026 for an SSRF guard bypass in the mcp-fetch-server package. VulnCheck assigned CVE-2026-141591 on 2 December and lists eight reporters, with zhijiewong named as the first, reporting on 23 May 2026. Version 1.2.0 carries the fix.

## How it works

fetch-mcp's validateUrl and validateResolvedIp checks relied on the private-ip library to reject internal addresses. The WHATWG URL parser rewrites an IPv4-mapped IPv6 literal into hex form, which private-ip did not recognize as private. The same library also missed multicast and reserved ranges, a trailing-dot localhost, and wildcard localhost subdomains. Version 1.2.0 replaces it with a custom CIDR and reserved-range validator that unwraps mapped addresses and fails closed on malformed input.

## Who is affected

Versions 1.1.0 up to 1.2.0 of mcp-fetch-server are affected. Any caller able to choose the URL passed to fetch_html, fetch_markdown, fetch_readable, fetch_txt or fetch_json can read the response, which in an agent means a web page or document that steers the tool. The advisory names cloud metadata at 169.254.169.254, loopback services and RFC 1918 networks as reachable.

## What to do

Update mcp-fetch-server to 1.2.0 or later; the project's latest release when the advisory went out was 2.0.1. Where the server runs next to cloud credentials, also block egress to link-local and internal ranges at the network level, because the bypassed guard sits inside the process.

## Quick facts

- **Affected:** mcp-fetch-server 1.1.0 up to 1.2.0
- **Fixed in:** 1.2.0
- **CVE:** CVE-2026-141591 (CWE-918)
- **Found by:** zhijiewong, first reporter, plus seven others
- **Disclosed:** 30 November 2026
- **Attack type:** SSRF guard bypass via IPv4-mapped IPv6
- **Reachable:** Loopback, RFC 1918 networks, cloud metadata

## Questions

### Which fetch-mcp tools does CVE-2026-141591 affect?

All five fetch tools. The advisory names fetch_html, fetch_markdown, fetch_readable, fetch_txt and fetch_json as sharing the bypassed validation, so an attacker who controls the URL handed to any of them can read responses from internal targets. Upgrading mcp-fetch-server to 1.2.0 replaces the private-ip check with a validator covering all five entry points.

### Is the fetch-mcp SSRF bypass the same as CVE-2025-65513?

No. The fetch-mcp advisory explicitly distinguishes CVE-2026-141591 from CVE-2025-65513, and separately references CVE-2025-8020 for the related gap in multicast and reserved ranges. CVE-2026-141591 covers the IPv4-mapped IPv6 hex normalization bypass, together with private-ip's incomplete handling of trailing-dot localhost and wildcard localhost subdomains.

### How does an attacker reach the fetch-mcp SSRF without server access?

Through content the agent fetches. fetch-mcp exists so an agent can pull web pages, so any page or document that persuades the agent to request an attacker-chosen URL supplies the input. Reaching the cloud metadata address then returns instance credentials inside the tool response, which lands in the model's context and can travel onward from there.

## Sources

1. [fetch-mcp Advisory](https://github.com/zcaceres/fetch-mcp/security/advisories/GHSA-rmj9-628v-jcc7)
2. [VulnCheck Advisory](https://www.vulncheck.com/advisories/mcp-fetch-server-1.1.0-before-1.2.0-ssrf-protection-bypass-via-ipv4-mapped-ipv6)
3. [Version 1.2.0](https://github.com/zcaceres/fetch-mcp/releases/tag/v1.2.0)
