MEDIUM 6.3

CVE-2026-12774: SSRF in BerriAI litellm MCP Server – Patch Guidance & Detection

BerriAI's litellm, an LLM proxy and management library, contains a server-side request forgery (SSRF) vulnerability in its MCP Server connection testing functionality. An authenticated attacker can manipulate the MCP Server Connection Testing feature to make the litellm server send arbitrary HTTP requests to internal or external systems on behalf of the attacker. This flaw affects litellm versions up to 1.82.2 and requires valid credentials to exploit, limiting immediate risk but creating a meaningful exposure for organizations running vulnerable instances accessible to untrusted users or in multi-tenant environments.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Weaknesses (CWE)
CWE-918
Affected products
1 configuration(s)
Published / Modified
2026-06-21 / 2026-06-24

NVD description (verbatim)

A security vulnerability has been detected in BerriAI litellm up to 1.82.2. Affected by this vulnerability is the function _execute_with_mcp_client of the file litellm/proxy/_experimental/mcp_server/rest_endpoints.py of the component MCP Server Connection Testing. The manipulation leads to server-side request forgery. Remote exploitation of the attack is possible. The exploit has been disclosed publicly and may be used. The vendor was contacted early about this disclosure.

5 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in the _execute_with_mcp_client function within litellm/proxy/_experimental/mcp_server/rest_endpoints.py. The MCP Server Connection Testing component fails to properly validate or sanitize user-supplied input when establishing outbound connections. An authenticated user can craft a malicious request that causes the litellm server to initiate HTTP requests to arbitrary destinations, including internal IP ranges, cloud metadata endpoints, or external attacker-controlled servers. The CWE-918 classification confirms this as a classic SSRF flaw where user input flows directly into HTTP client operations without adequate filtering.

Business impact

For organizations using litellm as a managed proxy for LLM API requests, this vulnerability enables credential theft and lateral movement. An attacker with proxy access could exfiltrate internal secrets by forcing the server to connect to attacker-controlled logging or data collection infrastructure. In cloud environments, SSRF can be chained to access instance metadata services (IMDSv1/v2), potentially leading to cloud credential compromise. Multi-tenant deployments and shared litellm instances face heightened risk if tenant isolation relies on network segmentation rather than cryptographic controls.

Affected systems

BerriAI litellm versions up to and including 1.82.2 are affected. The vulnerability is specific to the MCP Server integration in the experimental proxy module. Organizations should verify their deployed version and check whether the MCP Server feature is enabled or accessible. Verify the exact affected version range against the vendor advisory to confirm patch eligibility.

Exploitability

Exploitation requires authentication (PR:L in CVSS), meaning an attacker needs valid credentials or access to the litellm proxy. Public exploit disclosure has occurred, reducing the time-to-weapon for adversaries. However, the requirement for prior authentication prevents unauthenticated, remote exploitation. Risk is elevated in environments where proxy access is granted to third parties, contractors, or less-trusted internal teams. The experimental nature of the MCP Server component suggests many production deployments may not yet use this feature, narrowing the immediate affected population.

Remediation

Upgrade litellm to a patched version released after 1.82.2. Verify the exact patch version number in the official BerriAI security advisory or GitHub releases. Organizations unable to patch immediately should restrict network access to the litellm proxy to trusted internal networks only, disable the MCP Server feature if not actively used, and implement outbound firewall rules to prevent the litellm process from reaching sensitive internal systems or cloud metadata endpoints.

Patch guidance

Check the BerriAI litellm GitHub repository and official security advisories for the patched version number and release notes. Apply patches through your standard deployment mechanism (pip, container image rebuild, or package manager). After patching, validate that the MCP Server functionality is still available if required, and test that legitimate MCP Server connections continue to function. Document the patch application for compliance and audit purposes.

Detection guidance

Monitor outbound HTTP/HTTPS connections initiated by the litellm process to internal IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), cloud metadata endpoints (169.254.169.254), or unexpected external domains. Inspect litellm proxy logs for unusual MCP Server connection attempts or error messages related to network connectivity. Correlate authentication events with subsequent outbound connection anomalies. In WAF or API gateway logs, look for requests to the /mcp_server or rest_endpoints paths with payloads designed to trigger SSRF behavior.

Why prioritize this

Although the CVSS score is MEDIUM (6.3), this vulnerability warrants accelerated patching because: (1) public exploit disclosure exists, (2) SSRF in proxy software enables privilege escalation and lateral movement, (3) cloud metadata exfiltration can lead to account takeover, and (4) the authentication requirement is often weak in proxy-as-a-service architectures. Organizations running multi-tenant or externally-accessible litellm instances should prioritize this remediation over lower-severity flaws.

Risk score, explained

The CVSS:3.1 score of 6.3 (MEDIUM) reflects network attack surface (AV:N), low attack complexity (AC:L), and authentication requirement (PR:L). The Confidentiality, Integrity, and Availability impacts are each rated as Low (C:L/I:L/A:L) because SSRF allows data exposure and system compromise but not direct denial of service or data destruction. The score underweights the real-world risk in multi-tenant and cloud environments where SSRF + metadata endpoint access can escalate to high-impact credential theft. Organizations should consider raising their internal priority above the baseline CVSS if they operate proxy infrastructure accessible to multiple tenants or less-trusted users.

Frequently asked questions

Do we need to patch if we don't use the MCP Server feature?

The vulnerability is specific to the MCP Server Connection Testing functionality. If your deployment does not enable or expose MCP Server endpoints, the attack surface is reduced. However, review your configuration to confirm. Default configurations should be audited, as experimental features may be enabled unintentionally. Patching is still recommended to eliminate the risk entirely.

Can this vulnerability be exploited without network access to the proxy?

Yes, if the attacker has valid credentials to the litellm proxy (via API key, OAuth token, or other authentication method). The vulnerability does not require direct network access to the affected function; a remote user with proxy credentials can trigger it. This makes shared or externally-accessible proxy instances particularly risky.

What is the relationship between this vulnerability and cloud metadata leaks?

In cloud environments (AWS, Azure, GCP), SSRF vulnerabilities can be weaponized to access instance metadata endpoints (typically 169.254.169.254). These endpoints return temporary credentials, SSH keys, and configuration data. An attacker exploiting this litellm SSRF could retrieve cloud credentials and assume the identity of the litellm service account, leading to lateral movement and data exfiltration.

Is there a workaround if we cannot patch immediately?

Implement network segmentation to restrict outbound traffic from the litellm process. Configure firewall rules to block access to internal IP ranges and cloud metadata endpoints. Disable the MCP Server feature if not required. Rotate any credentials that may have been exposed or are accessible via the proxy. Monitor for suspicious connection attempts. These mitigations reduce risk but do not eliminate the vulnerability; patching is the proper long-term solution.

This analysis is provided for informational purposes and does not constitute professional security advice. All technical details are derived from the publicly disclosed CVE record and vendor advisories. Patch version numbers and availability should be verified directly with BerriAI's official security announcements. Organizations should conduct their own risk assessment based on their specific deployment architecture, threat model, and data sensitivity. SEC.co makes no warranty regarding the accuracy or completeness of this analysis and disclaims liability for any misuse of this information or failure to apply recommended mitigations. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).