/

CVE-2026-45609

Severity:

HIGH RISK

(7.2)

SSRF in mcp-security Dynamic Client Registration

CVE-2026-45609

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Server-Side Request Forgery leading to internal network access and potential data exposure

Severity:

HIGH RISK

(7.2)

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

A Server-Side Request Forgery (SSRF) weakness in the mcp-security framework for Spring AI allows untrusted URLs to be used for OAuth discovery and metadata retrieval without proper validation.

In environments where Dynamic Client Registration (DCR) is enabled, an attacker who can influence these URLs may be able to coerce the server into making requests to internal or otherwise sensitive network endpoints.

Affected context

The issue occurs in Spring AI deployments using the mcp-security framework with Dynamic Client Registration (DCR) enabled.

In these setups, the framework performs outbound HTTP requests for OAuth-related discovery and metadata based on URLs that can originate from untrusted sources.

Because the implementation does not enforce the SSRF mitigations mandated by the Model Context Protocol (MCP) security specifications, requests may be sent to attacker-controlled or internal network locations, depending on how URLs are supplied and validated upstream.

Exploit preconditions

  • Attack surface: OAuth discovery and metadata retrieval endpoints within mcp-security used during Dynamic Client Registration.
  • Required access: Ability to provide or influence OAuth issuer, discovery, or metadata URLs (e.g., via configuration, registration payloads, or integration points that accept external input).
  • Trigger point: The application invokes OAuth discovery/metadata resolution, causing mcp-security to issue outbound HTTP requests to the supplied URL.
  • Why exploitation is possible: The framework does not implement required SSRF defenses (such as allowed host/IP lists, internal address blocking, or scheme/port restrictions) for these outbound calls, allowing unvalidated URLs to be used as request targets.

Why this happens

The core issue is a missing validation and restriction layer around outbound HTTP requests made for OAuth discovery and metadata resolution.

Instead of enforcing the MCP security specification's SSRF mitigations, the implementation effectively trusts externally influenced URLs and forwards requests to them from a privileged server environment.

This aligns with CWE-918: Server-Side Request Forgery (SSRF), where a server is tricked into initiating network connections to arbitrary endpoints because it fails to constrain or sanitize user-influenced request targets.

Abstractly, the insecure pattern is: "accept URL-like input from less-trusted sources and use it directly in server-initiated HTTP calls without enforcing network, scheme, or destination policies."

Potential impact

  • The server may issue HTTP requests to internal network services that are not directly exposed to the internet.
  • Attackers could leverage SSRF to probe internal network topology, ports, and service behavior.
  • Internal metadata or configuration services (e.g., cloud instance metadata endpoints) could be queried, potentially revealing sensitive credentials or tokens.
  • Internal HTTP-based administrative or debug endpoints may be accessed, leading to configuration leakage or further compromise.
  • Outbound requests to attacker-controlled endpoints could bypass some egress or logging controls, aiding in data exfiltration or pivoting.

General mitigation guidance

Mitigation should focus on constraining and validating all outbound HTTP requests that originate from untrusted URL input, especially in OAuth discovery and metadata workflows.

Pattern-based defensive measures include:

  • Implementing strict allowlists or deny-lists for discovery/metadata hosts and domains, limiting requests to known, trusted providers.
  • Enforcing network-level restrictions: block private, loopback, link-local, and link-local multicast address ranges; restrict non-HTTP/HTTPS schemes and unusual ports.
  • Normalizing and validating URLs before use, rejecting malformed or ambiguous inputs and disallowing redirects to disallowed targets (e.g., internal IPs).
  • Introducing a dedicated outbound HTTP proxy with SSRF-aware policies so mcp-security never talks directly to the open network.
  • Applying least privilege at the network and runtime level: limit the server's ability to reach internal services that are not required for OAuth flows.
  • Treating any URL injected via DCR or other external configuration as untrusted by default and subject to additional policy checks.

These patterns help reduce the impact of untrusted URL handling even when new integration points or flows are added.

How teams detect issues like this

Detecting and monitoring for SSRF risk in this context involves both code-centric and operational approaches:

  • Static analysis: Configure rules to flag direct use of user- or configuration-supplied URLs in HTTP clients used by mcp-security, especially in OAuth discovery paths, when no destination validation or network checks are present.
  • Code review: Look for OAuth discovery/metadata resolution logic that:
  • Accepts URLs or issuer identifiers from external sources.
  • Passes them directly into HTTP client libraries without hostname/IP filtering, scheme checks, or redirect restrictions.
  • Lacks enforcement of MCP security specification requirements related to SSRF.
  • Runtime monitoring: Instrument outbound HTTP calls from the mcp-security components to identify:
  • Requests to internal IP ranges, loopback, or metadata endpoints.
  • Unexpected destinations triggered during DCR events.
  • Policy enforcement: Integrate security gates in CI/CD pipelines that:
  • Reject changes introducing new outbound HTTP client usage without SSRF controls.
  • Enforce organization-level URL validation utilities or network policy wrappers around HTTP clients.

Automated security testing tools and application security scanners can help surface unbounded outbound request patterns for further review.

Sources

SourceLink
github.comgithub.com/spring-ai-community/mcp-security/security/advisories/GHSA-qjp4-4jvr-xqg3

Frequently asked

questions

It can be, depending on how Dynamic Client Registration and related OAuth flows are exposed. If an external party can influence the URLs used for discovery or metadata, they can potentially trigger SSRF from the affected server.

The attacker needs the ability to supply or manipulate the OAuth issuer, discovery, or metadata URLs used by mcp-security when DCR is enabled. This might come through client registration endpoints, configuration interfaces, or upstream services that feed these values.

The safest approach is to enforce robust SSRF protections on all outbound HTTP calls tied to untrusted URLs: restrict destinations to trusted domains/IPs, block internal address ranges, validate schemes and ports, and ensure redirects cannot escape those policies.

Establish a standard SSRF-safe HTTP access layer for the application, require its use in all new outbound network features, and codify MCP security requirements into design reviews, static analysis checks, and CI policies so that unvalidated URL usage cannot be introduced unnoticed.

Find out what's already
exploitable in your codebase.