CVE-2026-12798: litellm SSRF Vulnerability in MCP OpenAPI Spec Loader
BerriAI's litellm library contains a server-side request forgery (SSRF) vulnerability in its MCP OpenAPI Spec Loader component. An authenticated attacker can manipulate the spec_path parameter to cause the server to make unintended network requests to internal or external systems. The vulnerability affects litellm versions up to 1.82.2 and requires valid authentication to exploit, limiting but not eliminating risk in many deployment scenarios.
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 weakness has been identified in BerriAI litellm up to 1.82.2. Affected by this vulnerability is the function load_openapi_spec_async of the file litellm/proxy/_experimental/mcp_server/openapi_to_mcp_generator.py of the component MCP OpenAPI Spec Loader. This manipulation of the argument spec_path causes server-side request forgery. It is possible to initiate the attack remotely. The exploit has been made available to the public and could be used for attacks. 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 exists in the load_openapi_spec_async function within litellm/proxy/_experimental/mcp_server/openapi_to_mcp_generator.py. By supplying a malicious spec_path argument, an attacker with valid credentials can trigger Server-Side Request Forgery (CWE-918), allowing the litellm server to initiate requests to arbitrary URLs. This could be leveraged to access internal services, cloud metadata endpoints, or external systems that the server can reach but the attacker cannot directly access.
Business impact
Organizations running litellm as a proxy or integration layer face potential data exposure if internal services are accessible via SSRF. Attackers with valid application credentials could enumerate internal infrastructure, exfiltrate sensitive configuration, or pivot to downstream systems. In multi-tenant or shared infrastructure environments, this could compromise isolation boundaries. The authentication requirement reduces the attack surface compared to unauthenticated SSRF, but credential compromise—either through phishing, supply chain, or other means—remains a realistic threat vector.
Affected systems
litellm versions up to and including 1.82.2 are affected. The vulnerability is specific to the MCP (Model Context Protocol) OpenAPI Spec Loader experimental feature. Deployments using litellm as a proxy service, especially those exposing the openapi_to_mcp_generator functionality, are most at risk. Verify your installed version against vendor advisories to confirm exposure.
Exploitability
The vulnerability is rated CVSS 6.3 (Medium) and has low attack complexity—it requires only a valid authentication context and network access to the litellm server. Public exploit code is available, increasing the likelihood of opportunistic attacks once credentials are obtained. The authentication requirement is the primary barrier; organizations with strong credential hygiene and network segmentation will see reduced practical risk, but patching remains important given the public availability of exploitation techniques.
Remediation
Upgrade litellm to a version beyond 1.82.2 that includes the SSRF fix. Verify the specific patched version number in the official BerriAI repository or security advisory. Until patching is possible, restrict access to litellm proxy endpoints to trusted internal networks only, limit the creation and distribution of authentication credentials for the service, and monitor outbound requests from the litellm process for suspicious destinations.
Patch guidance
Check the BerriAI litellm GitHub repository and official security advisories for the minimum patched version that addresses CVE-2026-12798. Apply patches in a staging environment first to verify compatibility with your proxy configuration and downstream integrations. Since the vulnerable component is experimental (MCP OpenAPI Spec Loader), verify whether your deployment actively uses this feature; if not, consider disabling it as a temporary mitigation. Ensure credential rotation policies are enforced after patching to invalidate any potentially exposed authentication tokens.
Detection guidance
Monitor litellm proxy logs for unusual outbound connection attempts, particularly to internal IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or cloud metadata services (169.254.169.254). Track requests to the openapi_to_mcp_generator endpoint with spec_path parameters containing unexpected URLs or file:// schemes. Network-side detection should flag outbound requests from the litellm service to non-whitelisted destinations. Alert on failed authentication attempts followed by successful SSRF-pattern requests, which may indicate credential compromise followed by exploitation.
Why prioritize this
Although rated Medium severity, this vulnerability merits prompt attention because: (1) exploit code is publicly available; (2) it allows lateral movement or data exfiltration once credentials are obtained; (3) it targets a common architectural pattern (proxy services); and (4) the fix is straightforward patching. Prioritize patching in environments where litellm is network-accessible and where internal services lack additional authentication or IP-based access controls.
Risk score, explained
The CVSS 6.3 score reflects the combination of network accessibility (AV:N), low attack complexity (AC:L), the requirement for valid authentication (PR:L), single-target scope (S:U), and partial impact on confidentiality, integrity, and availability (C:L/I:L/A:L). The score is not elevated to 'High' because the login requirement creates a meaningful prerequisite, but the public exploit and ease of weaponization mean real-world risk may exceed the numeric score in threat-rich environments.
Frequently asked questions
Does this vulnerability affect deployments that don't use the MCP OpenAPI Spec Loader feature?
No, the vulnerability is specific to the load_openapi_spec_async function in the MCP OpenAPI Spec Loader component. If your litellm deployment does not invoke this experimental feature, you are not directly exposed, though patching is still recommended for defense-in-depth and future-proofing.
What's the difference between this and a typical SSRF vulnerability?
This SSRF requires valid litellm authentication to exploit, whereas many SSRF flaws are unauthenticated. This means an attacker must first obtain valid credentials—either by compromise, social engineering, or supply chain attack—before they can weaponize the vulnerability. Once authenticated, however, the attacker can potentially access any system that the litellm server can reach.
Can this vulnerability be exploited through CI/CD pipelines or API integrations?
Yes, if litellm is integrated into an automated workflow and an attacker obtains or injects malicious credentials into that pipeline, they could trigger SSRF requests. Review credential management in CI/CD and integration platforms that connect to litellm to ensure secrets are properly rotated and scoped.
Is there a workaround if we cannot patch immediately?
Implement network segmentation to restrict outbound access from the litellm service to only approved destinations, disable the MCP OpenAPI Spec Loader feature if not in use, enforce strict authentication controls with frequent credential rotation, and monitor logs for suspicious spec_path parameters or unexpected outbound connections.
This analysis is provided for informational purposes and represents a point-in-time assessment based on published vulnerability data. Organizations should verify all patch versions, affected product versions, and remediation steps against official vendor advisories and their own environments before taking action. SEC.co does not provide warranties regarding the accuracy or completeness of this intelligence. Security teams should conduct their own testing and risk assessment aligned with their threat model and network architecture. Consult with BerriAI and your security team before deploying patches to production. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-12774MEDIUMSSRF in BerriAI litellm MCP Server – Patch Guidance & Detection
- CVE-2025-58175MEDIUMGeoServer SSRF Vulnerability in Proxy Configuration
- CVE-2026-10052MEDIUMQuay SSRF in LDAP/SMTP Validation—Internal Network Reconnaissance Risk
- CVE-2026-10177MEDIUMSSRF in Aider-AI Aider 0.86.3 AWS Metadata Endpoint
- CVE-2026-10239MEDIUMJeecgBoot Server-Side Request Forgery (SSRF) in Word Editing Module
- CVE-2026-10240MEDIUMJeecgBoot SSRF Vulnerability in /airag/airagModel/test Endpoint
- CVE-2026-10241MEDIUMJimuReport SSRF in File Download Function – Patch to 3.9.2
- CVE-2026-10274MEDIUMServer-Side Request Forgery in aem-mcp-server