NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-45609: Spring AI MCP Security: Unvalidated URL Fetching (SSRF)

highCVSS 3.1 7.2GHSA-qjp4-4jvr-xqg3

The Spring AI community mcp-client-security library (org.springaicommunity:mcp-client-security) before 0.1.9 fetches OAuth discovery and registration URLs from MCP servers without checking them. With Dynamic Client Registration enabled, a malicious MCP server or authorization server can make the client send requests to internal addresses. Upgrade to 0.1.9.

Published May 18, 2026 · Updated Jun 9, 2026 · Analysis Oct 27, 2026

What an attacker can do

During OAuth setup with Dynamic Client Registration, the client reads URLs that the remote side supplies: the protected resource metadata URL and authorization server URL from an MCP server, and every OAuth2 endpoint from an authorization server. The library requests them without checking whether they are internal or malicious. This ignores the SSRF mitigations that the MCP security best-practice guide requires.

The attacker is an MCP server or authorization server the application connects to. It can be a rogue server a user was tricked into adding, or a legitimate one that was compromised. It answers with a metadata URL that points at an internal host, a loopback service or a cloud metadata address, and the application's server makes the request from inside your network. The CVSS vector is network, no privileges, no user interaction, with changed scope and low confidentiality and integrity impact (7.2).

Only installations that set spring.ai.mcp.client.authorization.dynamic-client-registration.enabled=true are affected. McpMetadataDiscoveryService and DynamicClientRegistrationService have the same weakness when used directly.

Who is affected

Maven artifact org.springaicommunity:mcp-client-security below 0.1.9, and only where Dynamic Client Registration is switched on. Check the dependency and the property:

mvn dependency:tree | grep mcp-client-security
grep -r "dynamic-client-registration" src/main/resources

For Gradle, use gradle dependencies. If the property is absent or false, this flaw does not apply.

org.springaicommunity:mcp-client-security

Ecosystem
Maven
Affected
< 0.1.9
Fixed in
0.1.9
Check
mvn dependency:tree -Dincludes=org.springaicommunity:mcp-client-security

How to fix it

Upgrade org.springaicommunity:mcp-client-security to 0.1.9. The fix (pull request 68) adds a mcp-security-common module with URL validation: HTTPS is required for the resource metadata URL and the auth-server URLs, and an opt-in flag permits HTTP on localhost for local development. Boot properties for allowing loopback addresses were added in a separate commit. The sources do not state the property names or defaults, so read the project README.

Workaround from the advisory if you must stay on an old version: supply your own McpOAuth2ClientManager, subclass McpMetadataDiscoveryService and DynamicClientRegistrationService, or give the default implementations a RestClient whose ClientHttpRequestInterceptor filters URLs.

How to tell if you were hit

Check outbound request logs from the MCP client application for connections to private ranges, loopback or cloud metadata addresses during OAuth discovery and registration. Review which MCP servers and authorization servers the application is configured to trust, and look for new or unfamiliar ones. Egress firewall logs from the application host are the best source for internal targets. Beam logs the MCP tool calls an agent makes, which can show which server was added.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

The mcp-security framework fails to implement the mandatory SSRF mitigations outlined in the Model Context Protocol (MCP) security specifications. Specifically, it processes untrusted URLs for OAuth-related discovery and metadata without verifying if the targets are malicious or internal to the network.

This only affects installations with Dynamic Client Registration (DCR) enabled:

spring.ai.mcp.client.authorization.dynamic-client-registration.enabled=true

DCR does not validate URLs exposed by MCP Servers (protected resource metadata URL, authorization server URL) and Authorization Servers (all OAuth2 endpoints).

Workaround

When users need to perform DCR, they may provide their own McpOAuth2ClientManager. Both McpMetadataDiscoveryService and DynamicClientRegistrationService are also affected, if used, users should provide their own subclasses.

Alternatively, users can provide the default implementations of these classes with a RestClient that implements URL filtering through ClientHttpRequestInterceptor.

Credited to srikanthramu.

Questions

Is my app affected if Dynamic Client Registration is off?

The advisory says it only affects installations with DCR enabled, through spring.ai.mcp.client.authorization.dynamic-client-registration.enabled=true.

Which version fixes CVE-2026-45609?

mcp-client-security 0.1.9. It adds URL validation that requires HTTPS, with an opt-in exception for localhost.

Is there a workaround?

Yes. Provide your own McpOAuth2ClientManager, or supply default services with a RestClient that filters URLs through a ClientHttpRequestInterceptor.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries