/

CVE-2026-49857

Severity:

HIGH RISK

(7.4)

SSRF (CWE-918) in auth-fetch-mcp URL Validation Logic

CVE-2026-49857

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized access to loopback and private network services

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

auth-fetch-mcp contains a server-side request forgery (SSRF) protection bypass in its URL validation logic. An attacker who can supply a URL to the MCP server may use an IPv4-mapped IPv6 loopback address to reach services on the local host that should be inaccessible.

Affected context

The vulnerability occurs in auth-fetch-mcp deployments that use the affected URL validation path before passing user-controlled URLs to a browser or HTTP client. The risk is present when an attacker can influence a URL fetched by the MCP tool and the target environment exposes services on loopback or otherwise restricted network addresses.

Exploit preconditions

  • Attack surface: MCP content-fetching functionality that accepts attacker-influenced URLs
  • Required access: Ability to invoke the relevant MCP tool or cause it to process a supplied URL
  • Trigger point: URL validation before the request is sent to the browser or HTTP client
  • Why exploitation is possible: IPv4-mapped IPv6 loopback addresses can be normalized into hexadecimal form, causing the private-address check to misclassify them as non-IPv4 and allow the request

Why this happens

The root cause is incomplete canonicalization and validation of IPv4-mapped IPv6 addresses. The isPrivateV6() logic relies on an IPv4 check that does not recognize the URL parser's hex-normalized representation of a mapped loopback address. This behavior maps to CWE-918: Server-Side Request Forgery, because attacker-controlled network destinations are insufficiently restricted before the server initiates a request.

Potential impact

  • An attacker may access loopback-only administrative or diagnostic services
  • The MCP server could expose responses from internal network endpoints
  • Credentials, tokens, or service metadata may be disclosed
  • Internal services could be targeted through the trusted server network position
  • Further compromise may be possible if an accessible internal service has additional weaknesses

General mitigation guidance

Mitigation typically focuses on canonicalizing addresses before applying network restrictions and enforcing deny-by-default egress policy.

Common defensive patterns include:

  • Parse and normalize IPv4, IPv6, and IPv4-mapped IPv6 addresses consistently before validation
  • Apply private, loopback, link-local, multicast, and unspecified-address checks after canonicalization
  • Resolve hostnames and validate every resulting address, including redirects and alternate address families
  • Restrict outbound requests with network-level egress controls in addition to application checks
  • Use allowlists for approved schemes, hosts, ports, and destinations where feasible
  • Prefer vendor-maintained releases containing the relevant security correction
  • Run the MCP service with least-privilege network and operating-system permissions

How teams detect issues like this

Organizations can detect similar SSRF bypasses through:

  • Static analysis and code review of URL validation, IP parsing, redirect handling, and DNS resolution logic
  • Test cases covering IPv4, IPv6, IPv4-mapped IPv6, hexadecimal, decimal, and alternate textual address forms
  • Dynamic testing that verifies requests to loopback, private, link-local, and cloud metadata destinations are denied
  • Network telemetry monitoring unexpected outbound requests to local or restricted address ranges
  • Policy enforcement that limits permitted egress destinations independently of application-layer validation
  • Automated security review tools that flag user-controlled URLs passed to HTTP clients or browser automation

Sources

SourceLink
github.comgithub.com/ymw0407/auth-fetch-mcp/commit/c5c523cd55b24ae1680c5bacef95d59a81ae3450
github.comgithub.com/ymw0407/auth-fetch-mcp/releases/tag/v3.0.1
github.comgithub.com/ymw0407/auth-fetch-mcp/security/advisories/GHSA-pvrj-8cg3-j5f8

Frequently asked

questions

It may be exploitable through the MCP interface when an attacker can cause the server to fetch a URL. Direct network access to the host is not necessarily required.

The attacker generally needs the ability to invoke the fetching tool or control a URL that the tool will process. The exact scope depends on how MCP authentication and tool exposure are configured.

Canonicalize all address forms before validation, reject private and loopback destinations by default, validate resolved addresses and redirects, and enforce network-level egress restrictions.

Maintain comprehensive address-format test suites, treat URL parsing as a security boundary, use destination allowlists where practical, and combine application validation with least-privilege network policies.

Find out what's already
exploitable in your codebase.