CVE-2026-12772: Session Expiration Flaw in BerriAI litellm Proxy Authentication
A vulnerability in the BerriAI litellm proxy authentication system allows authenticated users to manipulate session handling logic, leading to session expiration. An attacker with valid credentials can trigger this flaw remotely through the PROXY_ADMIN database API Key Generator component. The vulnerability affects litellm versions up to and including 1.82.2. Public exploit code is available, increasing the practical risk of exploitation.
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-613
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-21 / 2026-06-24
NVD description (verbatim)
A security flaw has been discovered in BerriAI litellm up to 1.82.2. This impacts the function authenticate_user of the file litellm/proxy/auth/login_utils.py of the component PROXY_ADMIN database API Key Generator. Performing a manipulation results in session expiration. The attack may be initiated remotely. The exploit has been released to the public and may 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
CVE-2026-12772 is a session management vulnerability (CWE-613) in the authenticate_user function within litellm/proxy/auth/login_utils.py. The flaw permits authenticated users to manipulate authentication state, resulting in forced session expiration. The CVSS v3.1 base score of 6.3 reflects the requirement for prior authentication (PR:L), network accessibility (AV:N), low attack complexity (AC:L), and impact across confidentiality, integrity, and availability (C:L/I:L/A:L). No specialized attack complexity is required once an attacker has gained legitimate credentials.
Business impact
Session expiration attacks can disrupt legitimate user workflows, force re-authentication overhead, and degrade user experience for administrators managing proxy infrastructure. While not directly enabling unauthorized data access, the ability to terminate sessions creates opportunities for follow-on attacks, including credential harvesting during forced re-authentication. Organizations relying on litellm for API gateway orchestration should assess continuity of service if authenticated users or compromised accounts exploit this flaw.
Affected systems
BerriAI litellm versions up to 1.82.2 are affected. The vulnerability specifically impacts deployments using the PROXY_ADMIN database API Key Generator component. Any organization running the litellm proxy layer for LLM request routing and authentication should evaluate their version status immediately.
Exploitability
The vulnerability requires valid authentication credentials (PR:L) and network access to the litellm proxy endpoint. Public exploit code is already available, lowering the barrier to weaponization. However, the attacker cannot act without legitimate account access, which somewhat constrains mass-scale exploitation unless account compromise is widespread. The low attack complexity and lack of user interaction requirements (UI:N) mean that once credentials are obtained, exploitation is straightforward.
Remediation
Upgrade litellm to a patched version released after 1.82.2. Verify the exact patched version in the BerriAI litellm release notes or security advisory. In the interim, implement network-level access controls to restrict who can reach the PROXY_ADMIN API endpoint, review and revoke API keys for any users suspected of testing or exploiting this flaw, and monitor authentication logs for unusual session termination patterns.
Patch guidance
Check the BerriAI litellm GitHub repository and official release notes for versions newer than 1.82.2 that address CWE-613 in the authentication layer. Apply patches in a staged manner: test in a non-production proxy environment first, verify that API key generation and session management function correctly post-upgrade, then deploy to production proxy instances. Plan for brief downtime or use a blue-green deployment if running critical LLM routing infrastructure.
Detection guidance
Monitor litellm proxy logs for frequent session terminations or expiration events, especially clustered around specific user accounts or API keys. Search authentication logs (login_utils.py output or audit trails) for repeated calls to authenticate_user with unusual parameter patterns. Alert on any sudden increase in failed session validation or authentication errors. If running intrusion detection, flag network requests to the PROXY_ADMIN API key generator endpoint from unexpected sources.
Why prioritize this
Although the CVSS score is MEDIUM (6.3), the availability of public exploits and the potential for lateral movement via credential harvesting during forced re-authentication warrant prompt patching. The requirement for prior authentication limits impact to insider threats or compromised accounts, but those scenarios are common in real-world breaches. Prioritize patching in environments where litellm proxy is internet-facing or accessible to third-party integrations.
Risk score, explained
The CVSS v3.1 score of 6.3 (MEDIUM) reflects a bounded-impact scenario: authenticated access required, network-exploitable, no user interaction needed, and partial impact to confidentiality, integrity, and availability. The score does not account for the public availability of exploit code or the potential for chained attacks. Organizations should consider contextual factors—such as whether their litellm proxy is exposed to untrusted networks or whether account compromise is likely—when determining internal risk ratings.
Frequently asked questions
Do I need valid credentials to exploit this vulnerability?
Yes. The vulnerability requires prior authentication (PR:L in the CVSS vector), so an attacker must possess a legitimate API key or user account to trigger session manipulation. However, once credentials are obtained through phishing, credential stuffing, or a separate breach, exploitation is trivial.
What is CWE-613 and why does it matter here?
CWE-613 covers 'Improper Restriction of Rendered UI Layers or Frames.' In this context, it refers to insecure session management and authentication state handling. The vulnerability allows authenticated users to bypass or manipulate session validation, leading to forced expiration—a classic session fixation or hijacking variant.
If litellm is only used internally on our network, should we still patch?
Yes, especially if internal users have access to the PROXY_ADMIN API key generator. Insider threats and compromised internal accounts remain real risks. Additionally, public exploit code lowers the barrier for attackers if your network is breached or if an insider shares credentials externally.
Will patching disrupt our LLM proxy service?
Patching requires a restart of the litellm proxy service, which will briefly interrupt API routing. Plan an upgrade window and use deployment strategies (blue-green, canary) if your LLM orchestration is production-critical.
This analysis is provided for informational purposes and does not constitute legal, compliance, or professional security advice. SEC.co does not verify the accuracy of vendor statements or the completeness of published advisories. Organizations must validate patch availability and compatibility with their specific litellm deployment and dependent services before applying updates. The presence or absence of a CVE in CISA's KEV catalog does not diminish its operational risk; organizational context, asset exposure, and threat landscape determine actual prioritization. Always consult vendor documentation and conduct internal testing before deploying patches to production systems. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-12796MEDIUMlitellm SSO Session Expiration Vulnerability (CVSS 6.3)
- CVE-2026-44188MEDIUMAnsible Lightspeed Session Hijacking via Token Non-Revocation
- CVE-2026-48726MEDIUMApache Airflow JWT Token Revocation Bypass in FAB and Keycloak Logout
- CVE-2026-53824MEDIUMOpenClaw Token Revocation Bypass (CVSS 6.5)
- CVE-2026-53830MEDIUMOpenClaw Webhook Secret Revocation Bypass (CVSS 6.5)
- CVE-2026-55423MEDIUMLangflow Session Invalidation Flaw—Impact, Patch & Detection
- CVE-2026-9802MEDIUMKeycloak Refresh Token Replay After Revocation
- CVE-2025-62340LOWHCL iControl Session Timeout Vulnerability – Analysis & Remediation