Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-12796

CVE-2026-12796: Litellm Auth Bypass Vulnerability

CVE-2026-12796 is an authentication bypass flaw in BerriAI Litellm affecting SSO authentication flow that allows remote attackers to exploit session expiration. This article covers technical details, versions up to 1.82.2, impact analysis, and mitigation strategies.

Published:

CVE-2026-12796 Overview

CVE-2026-12796 affects BerriAI litellm versions up to 1.82.2. The flaw resides in the get_redirect_response_from_openid function within litellm/proxy/management_endpoints/ui_sso.py, part of the Single Sign-On (SSO) Authentication Flow component. The vulnerability is classified under [CWE-613] Insufficient Session Expiration. Attackers can exploit it remotely over the network, and a public proof-of-concept exists. The vendor was contacted prior to disclosure.

Critical Impact

Authenticated remote attackers can leverage improper session expiration handling in the SSO flow to maintain access beyond intended session lifetimes, undermining authentication assurance for litellm proxy deployments.

Affected Products

  • BerriAI litellm versions up to and including 1.82.2
  • litellm proxy deployments exposing the UI SSO authentication flow
  • Environments using OpenID Connect integration via ui_sso.py

Discovery Timeline

  • 2026-06-21 - CVE-2026-12796 published to NVD
  • 2026-06-24 - Last updated in NVD database

Technical Details for CVE-2026-12796

Vulnerability Analysis

The vulnerability sits in the get_redirect_response_from_openid function in litellm/proxy/management_endpoints/ui_sso.py. This function handles OpenID Connect redirect responses during the SSO authentication flow for the litellm proxy management interface. The implementation fails to enforce correct session expiration semantics on tokens or session artifacts produced during redirect handling.

An authenticated attacker on the network can manipulate the SSO flow to preserve session validity past its intended lifetime. Because session expiration is the primary control bounding the window of unauthorized access following credential compromise or shared workstation use, weakening it lowers the cost of credential reuse and post-authentication abuse against the litellm proxy.

The issue is categorized as [CWE-613] Insufficient Session Expiration. A public proof-of-concept is available on GitHub Gist, increasing the likelihood of opportunistic exploitation attempts against exposed litellm deployments.

Root Cause

The root cause is improper handling of session lifetime within the SSO redirect logic. The get_redirect_response_from_openid path does not consistently apply expiration constraints to session state returned to the client after OpenID authentication completes. As a result, sessions persist longer than the security policy intends.

Attack Vector

The attack vector is network-based and requires low privileges. The attacker interacts with the litellm proxy's SSO authentication endpoints and manipulates the redirect flow to obtain or retain a session that should have expired. User interaction is not required. See the GitHub Gist PoC and VulDB CVE-2026-12796 entry for additional technical context.

No verified exploit code is reproduced here. Refer to the published proof-of-concept for the exact request sequence.

Detection Methods for CVE-2026-12796

Indicators of Compromise

  • Session tokens or cookies issued by the litellm proxy that remain valid significantly past configured expiration windows.
  • Repeated successful authentication state returns from /sso/key/generate or related ui_sso endpoints from the same client without re-authentication.
  • Access to litellm management endpoints from sessions established before a known credential rotation event.

Detection Strategies

  • Audit litellm proxy access logs for SSO redirect responses originating from get_redirect_response_from_openid and correlate session identifiers against expected lifetime policy.
  • Compare issued session expiration timestamps with actual last-use timestamps to identify sessions exceeding configured TTL.
  • Monitor for anomalous reuse of OpenID redirect parameters or repeated state values across authentication attempts.

Monitoring Recommendations

  • Centralize litellm proxy authentication and management endpoint logs in a SIEM and alert on session reuse beyond policy windows.
  • Track the litellm version in inventory and flag any instance at or below 1.82.2 for prioritized patching.
  • Monitor outbound OpenID Provider traffic from litellm hosts for unusual frequency or timing patterns.

How to Mitigate CVE-2026-12796

Immediate Actions Required

  • Upgrade BerriAI litellm to a release later than 1.82.2 that addresses the get_redirect_response_from_openid session expiration handling.
  • Restrict network exposure of the litellm proxy management UI to trusted administrative networks or VPN segments.
  • Invalidate all existing litellm SSO sessions and force re-authentication after upgrading.

Patch Information

Review the VulDB Vulnerability #372558 entry and the litellm project repository for the fixed release addressing the session expiration logic in litellm/proxy/management_endpoints/ui_sso.py. The vendor was contacted prior to public disclosure.

Workarounds

  • Reduce the session lifetime configuration at the OpenID Provider so that even improperly extended sessions remain short-lived.
  • Place the litellm proxy behind a reverse proxy or identity-aware gateway that enforces independent session timeout policies.
  • Disable the UI SSO authentication flow until the upgrade is applied if business requirements allow.
bash
# Configuration example: pin litellm to a fixed (patched) version after upgrading
pip install --upgrade 'litellm>1.82.2'

# Verify installed version
python -c "import litellm; print(litellm.__version__)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.