CVE-2026-12771: litellm: JWT auth bypass in M2M proxy handler
HIGH PoC AVAILABLE CISA: TRACK*A publicly disclosed improper authorization flaw in litellm's Machine-to-Machine JWT handler (CVE-2026-12771) allows a low-privileged remote attacker to bypass access controls in the proxy authentication layer of versions up to 1.82.2. litellm is widely deployed as the AI gateway layer that aggregates and routes requests to multiple LLM providers — OpenAI, Anthropic, Azure OpenAI, Bedrock — meaning a successful bypass could expose all downstream API keys stored in the proxy and enable unauthorized model access across your entire AI stack. Though CVSS scores medium (5.0) and the attack complexity is rated high, a public proof-of-concept exploit is already available on GitHub (gist by YLChen-007), materially lowering the bar for exploitation by opportunistic attackers. Upgrade immediately beyond 1.82.2, restrict network exposure of the litellm proxy endpoint, and rotate all downstream LLM provider API keys if the proxy was Internet-accessible.
What is the risk?
Medium CVSS (5.0) understates the organizational risk for AI-heavy environments. litellm serves as a centralized trust boundary aggregating API keys and routing inference traffic to multiple LLM providers; compromise of its M2M JWT authorization layer collapses that boundary. Attack complexity is high (credential or token precondition required), and there is no confirmed active exploitation or CISA KEV listing, but the public PoC lowers the effective exploitation bar. Organizations exposing litellm proxy endpoints on internal networks with M2M integrations should treat this as elevated-medium priority.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| LiteLLM | pip | — | No patch |
Do you use LiteLLM? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Upgrade litellm to a version beyond 1.82.2 — monitor the BerriAI GitHub for a patched release and apply immediately.
-
If patching is not immediately possible, restrict network access to the litellm proxy using firewall rules, VPN enforcement, or IP allowlisting to reduce the attack surface.
-
Rotate all downstream LLM provider API keys (OpenAI, Anthropic, Azure, etc.) stored in litellm configuration if the proxy was network-accessible during the vulnerability window.
-
Temporarily disable M2M JWT authentication in favor of API key-based auth if your deployment supports it.
-
Audit authentication logs in user_api_key_auth.py call paths for anomalous JWT token presentations, unexpected privilege escalations, or unauthorized model invocations.
-
Scan your deployment using the referenced PoC gist pattern to confirm exploitability in your specific configuration.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-12771?
A publicly disclosed improper authorization flaw in litellm's Machine-to-Machine JWT handler (CVE-2026-12771) allows a low-privileged remote attacker to bypass access controls in the proxy authentication layer of versions up to 1.82.2. litellm is widely deployed as the AI gateway layer that aggregates and routes requests to multiple LLM providers — OpenAI, Anthropic, Azure OpenAI, Bedrock — meaning a successful bypass could expose all downstream API keys stored in the proxy and enable unauthorized model access across your entire AI stack. Though CVSS scores medium (5.0) and the attack complexity is rated high, a public proof-of-concept exploit is already available on GitHub (gist by YLChen-007), materially lowering the bar for exploitation by opportunistic attackers. Upgrade immediately beyond 1.82.2, restrict network exposure of the litellm proxy endpoint, and rotate all downstream LLM provider API keys if the proxy was Internet-accessible.
Is CVE-2026-12771 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-12771, increasing the risk of exploitation.
How to fix CVE-2026-12771?
1. Upgrade litellm to a version beyond 1.82.2 — monitor the BerriAI GitHub for a patched release and apply immediately. 2. If patching is not immediately possible, restrict network access to the litellm proxy using firewall rules, VPN enforcement, or IP allowlisting to reduce the attack surface. 3. Rotate all downstream LLM provider API keys (OpenAI, Anthropic, Azure, etc.) stored in litellm configuration if the proxy was network-accessible during the vulnerability window. 4. Temporarily disable M2M JWT authentication in favor of API key-based auth if your deployment supports it. 5. Audit authentication logs in user_api_key_auth.py call paths for anomalous JWT token presentations, unexpected privilege escalations, or unauthorized model invocations. 6. Scan your deployment using the referenced PoC gist pattern to confirm exploitability in your specific configuration.
What systems are affected by CVE-2026-12771?
This vulnerability affects the following AI/ML architecture patterns: LLM proxy and gateway deployments, Multi-model inference pipelines, Agent frameworks using litellm as inference backend, Server-to-server M2M AI integrations.
What is the CVSS score for CVE-2026-12771?
CVE-2026-12771 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.29%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0012 Valid Accounts AML.T0034 Cost Harvesting AML.T0040 AI Model Inference API Access AML.T0049 Exploit Public-Facing Application AML.T0091.000 Application Access Token Compliance Controls Affected
What are the technical details?
Original Advisory
A vulnerability was identified in BerriAI litellm up to 1.82.2. This affects an unknown function of the file litellm/proxy/auth/user_api_key_auth.py of the component M2M JWT Handler. Such manipulation leads to improper authorization. The attack can be launched remotely. A high complexity level is associated with this attack. The exploitability is reported as difficult. The exploit is publicly available and might be used. The vendor was contacted early about this disclosure.
Exploitation Scenario
An attacker with low-privileged internal network access — a compromised service account, a rogue insider, or a pivoting threat actor — identifies a litellm proxy instance via internal network scanning. They craft a specially manipulated M2M JWT token that exploits the improper privilege assignment flaw (CWE-266/CWE-285) in user_api_key_auth.py, bypassing the expected authorization checks to obtain elevated proxy access. With proxy-level access, the attacker enumerates available model routes, exfiltrates stored provider API keys, and begins issuing unauthorized LLM inference requests — either for data exfiltration via the LLM context, cost harvesting by running resource-intensive queries, or as a pivot point to abuse AI agent tooling connected to the proxy.
Weaknesses (CWE)
CWE-266 Incorrect Privilege Assignment
Primary
CWE-285 Improper Authorization
Primary
CWE-266 Incorrect Privilege Assignment CWE-285 Improper Authorization CWE-266 — Incorrect Privilege Assignment: A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.
- [Architecture and Design, Operation] Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- [Architecture and Design, Operation] Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2026-42208 9.8 LiteLLM: SQL injection exposes LLM API credentials
Same package: litellm CVE-2026-30623 9.8 LiteLLM: RCE via unsanitized MCP server config
Same package: litellm CVE-2026-54352 9.6 Budibase: zip symlink bypass exposes all server secrets
Same package: litellm CVE-2026-35030 9.1 LiteLLM: auth bypass via JWT cache key collision
Same package: litellm CVE-2026-35029 8.8 LiteLLM: auth bypass allows RCE and full takeover
Same package: litellm