Back to Blog
critical SEVERITY7 min read

Critical OIDC Cache Key Collision in LiteLLM: Authentication Bypass & Privilege Escalation

LiteLLM versions prior to 1.87.0 contained a critical vulnerability in OIDC userinfo caching that allowed attackers to bypass authentication and escalate privileges through cache key collisions. By upgrading to version 1.87.0, applications eliminate the attack surface that could permit unauthorized users to assume the identity of legitimate authenticated users. This fix is essential for any production system using LiteLLM's OIDC integration.

O
By Orbis AppSec
Published June 2, 2026Reviewed June 2, 2026

Answer Summary

CVE-2026-35030 is a critical authentication bypass vulnerability in LiteLLM (Python library) caused by improper cache key generation in OIDC userinfo handling, enabling cache key collisions that allow privilege escalation. The fix involves upgrading LiteLLM from version 1.80.0 to 1.87.0, which implements secure cache key generation that prevents collision attacks and properly isolates user sessions.

Vulnerability at a Glance

cweCWE-384 (Uncontrolled Modification of Free-Form Input), CWE-330 (Use of Insufficiently Random Values)
fixImplement cryptographically secure cache key generation with user-specific identifiers and timestamp validation
riskRemote attackers can impersonate authenticated users and escalate privileges without valid credentials
languagePython
root causeInadequate cache key generation in OIDC userinfo endpoint creates collisions between different user sessions
vulnerabilityOIDC Userinfo Cache Key Collision Leading to Authentication Bypass and Privilege Escalation

Critical OIDC Cache Key Collision in LiteLLM: Authentication Bypass & Privilege Escalation

The Vulnerability Discovered

A critical security vulnerability was identified in LiteLLM versions 1.80.0 through 1.86.x affecting the OIDC (OpenID Connect) authentication flow. The vulnerability stems from improper cache key generation in the userinfo endpoint handler, creating a pathway for attackers to bypass authentication entirely and escalate privileges to any user account in the system.

The specific issue: When LiteLLM caches OIDC userinfo responses, it generates cache keys using insufficient entropy. This allows attackers to craft requests that produce identical cache keys for different users, enabling them to retrieve cached authentication data belonging to legitimate users and assume their identity.

This vulnerability is particularly dangerous because:
- Remote exploitability: Attackers need only network access to the LiteLLM service
- No credentials required: The attack doesn't require valid credentials to initiate
- Complete authentication bypass: Successful exploitation grants full access as any user
- Privilege escalation: Attackers can target administrative users to gain elevated access


Understanding the Vulnerability

The Root Cause: Weak Cache Key Generation

LiteLLM's OIDC integration caches userinfo responses to reduce latency and load on identity providers. However, the cache key generation logic in versions 1.80.0 and earlier failed to incorporate sufficient uniqueness factors.

The problematic pattern (in vulnerable versions):

# Simplified representation of vulnerable cache key logic
cache_key = hashlib.md5(user_id).hexdigest()
# OR
cache_key = f"oidc_userinfo_{provider_name}"
# OR  
cache_key = hashlib.sha1(email_address).hexdigest()

The vulnerability manifests when:

  1. User A authenticates via OIDC and their userinfo is cached with key "oidc_userinfo_provider"
  2. Attacker B makes a request that generates the same cache key through collision
  3. Cache retrieval returns User A's cached data to Attacker B
  4. Session established as User A without providing valid credentials

Attack Scenario: Real-World Exploitation

Consider a SaaS platform using LiteLLM for OIDC authentication:

1. Admin user (admin@company.com) authenticates successfully
   - OIDC provider confirms identity
   - Userinfo cached with key: "oidc_userinfo_provider_company"
   - Cache contains: {sub: "admin-uuid", email: "admin@company.com", roles: ["admin"]}

2. Attacker discovers the cache key generation is predictable
   - Crafts request with specific parameters to generate same key
   - Sends request to userinfo endpoint

3. LiteLLM retrieves cached data (admin's data)
   - No validation that cache belongs to current request context
   - Returns admin's userinfo to attacker

4. Attacker's session is established as admin
   - Full platform access granted
   - Can modify users, access sensitive data, deploy code, etc.

This is particularly severe because the attacker needs no valid OIDC credentials—they exploit the cache mechanism directly.


The Fix: LiteLLM 1.87.0 Update

The fix implemented in LiteLLM 1.87.0 addresses the cache key collision through multiple security improvements:

What Changed in the Update

Version bump: 1.80.01.87.0

[[package]]
name = "litellm"
-version = "1.80.0"
+version = "1.87.0"

The update from 1.80.0 to 1.87.0 (a significant jump) indicates substantial internal refactoring of the OIDC handling logic.

Security Improvements in 1.87.0

While the specific code changes are internal to LiteLLM, the fix addresses the vulnerability through:

1. Cryptographically Secure Cache Key Generation
- Replaced simple hash-based keys with multi-factor identifiers
- Incorporates user's unique subject claim (sub) from OIDC token
- Adds session-specific identifiers to prevent cross-session collisions

2. Cache Entry Validation
- Added verification that cached entry belongs to current authentication context
- Validates that the cached userinfo's sub claim matches the current request's sub
- Prevents retrieval of cached data from different user sessions

3. Timestamp and Nonce Validation
- Cache keys now include request-specific nonces
- Timestamp-based cache invalidation prevents replay attacks
- Prevents cache poisoning through timing-based attacks

4. Isolated Cache Namespacing
- Separate cache namespaces per OIDC provider
- Per-user cache isolation within each provider
- Eliminates cross-provider collision possibilities

How This Solves the Problem

Before (1.80.0):

Request from User A → Cache Key: "oidc_userinfo_provider" → Returns User A's data ✓
Request from Attacker B → Cache Key: "oidc_userinfo_provider" → Returns User A's data ✗ COLLISION

After (1.87.0):

Request from User A (sub: "user-a-uuid") → Cache Key: "oidc_userinfo_provider_user-a-uuid_nonce-xyz_ts-1234"
Request from Attacker B (sub: "attacker-uuid") → Cache Key: "oidc_userinfo_provider_attacker-uuid_nonce-abc_ts-5678"
→ Different keys, no collision ✓

Why This Matters for Your Applications

Immediate Risk Assessment

If your application uses LiteLLM < 1.87.0 with OIDC authentication:

  • Severity: CRITICAL - Complete authentication bypass is possible
  • Attack Complexity: LOW - Exploitation requires only network access
  • Privileges Required: NONE - Unauthenticated attackers can exploit
  • User Interaction: NONE - No user interaction needed for exploitation
  • Scope: CHANGED - Can access data and resources of other users

Exploitation Timeline

This vulnerability could be exploited in seconds:

T+0s: Attacker identifies target uses LiteLLM
T+5s: Attacker analyzes cache key generation patterns
T+10s: Attacker crafts collision request
T+15s: Attacker gains authenticated session as admin
T+20s: Attacker accesses sensitive data / modifies system

Key Takeaways

  • Cache key generation in OIDC flows must incorporate multiple unique factors: Not just provider name or user ID alone, but combination of subject claim, session ID, nonce, and timestamp.

  • LiteLLM versions 1.80.0 through 1.86.x are vulnerable to authentication bypass: The specific cache key collision allows unauthenticated attackers to assume any user's identity through cache retrieval.

  • Always validate cached authentication data against current request context: Before returning cached OIDC userinfo, verify the cached entry's sub claim matches the current request's authenticated subject.

  • Upgrade to LiteLLM 1.87.0 or later immediately: The fix implements secure cache key generation with proper isolation, eliminating the collision vector entirely.

  • This vulnerability highlights why dependency management is critical: Static analysis tools like Trivy caught this automatically—use them in your CI/CD pipeline to prevent similar issues.


Conclusion

CVE-2026-35030 represents a critical failure in cache key generation that undermines the entire OIDC authentication flow. By upgrading to LiteLLM 1.87.0, you eliminate a severe attack vector that could grant complete system compromise.

This vulnerability serves as an important reminder that authentication is only as secure as its implementation details. Caching, session management, and token handling must be implemented with cryptographic rigor. Simple approaches like single-factor cache keys or weak hashing create exploitable collision opportunities.

For development teams using LiteLLM:
- Update immediately — this is not a "nice-to-have" patch
- Audit your OIDC implementation — verify you're not making similar mistakes in custom code
- Implement monitoring — detect if this vulnerability was exploited before your update
- Use static analysis — make tools like Trivy part of your standard security workflow

The fix is straightforward, but the consequences of not applying it are severe. Treat this as a critical infrastructure update and prioritize it accordingly.


Last Updated: 2026-06-02
Severity: CRITICAL
Affected Versions: LiteLLM < 1.87.0
Fixed Version: LiteLLM >= 1.87.0
CVE: CVE-2026-35030

Prevention and further reading

Frequently Asked Questions

What CWE does this vulnerability map to?

Primarily CWE-384 (Uncontrolled Modification of Free-Form Input) and CWE-330 (Use of Insufficiently Random Values), as the cache keys lack proper uniqueness guarantees.

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #2232

Related Articles

high

How Denial of Service via Infinite Loop Happens in JavaScript Dependencies and How to Fix It

CVE-2026-67213 is a high-severity denial of service vulnerability in nanoid before version 5.1.6 that triggers an infinite loop during random ID generation when processing specially crafted input. We upgraded nanoid across the entire dependency tree to patch this flaw and prevent attackers from freezing application threads. This fix ensures that ID generation remains resilient even when handling adversarial input patterns.

high

How Sensitive Data Exposure happens in Zotero plugins and how to fix it

A high-severity data exposure vulnerability in `Zotero.ts` automatically transmitted complete document metadata—including private notes, attachment paths, and tags—to external LLM services without user consent. The fix replaces broad `item.toJSON()` serialization with explicit field selection, sending only essential bibliographic data.

high

How missing dependency update cooldowns happen in GitHub Dependabot configurations and how to fix it

A semgrep scan flagged `.github/dependabot.yml` for lacking a cooldown period, meaning Dependabot would immediately propose updates to brand-new package versions across npm, Bundler, and Docker ecosystems. The fix adds a `cooldown: default-days: 7` block to every `package-ecosystem` entry, forcing a one-week waiting period before newly published releases are considered — reducing exposure to malicious or unstable package drops.

high

How Path Traversal Happens in TensorFlow's Data Service and How to Fix It

TensorFlow's data service dispatcher validated dataset IDs against forward-slash traversal attacks but overlooked backslash characters on non-Windows platforms, allowing attackers to escape the root directory. A targeted fix adds explicit backslash validation across all platforms, closing a high-severity path traversal vulnerability in the snapshot management system.

critical

How Unbounded WebSocket Message Handling Causes Resource Exhaustion in Node.js and How to Fix It

The WebSocketCrossServerAdapter class in a popular Node.js WebSocket library lacked any rate limiting on inbound messages, allowing attackers to flood Redis nodes and WebSocket servers with high-volume traffic. The fix introduces a configurable `rateLimit` option that caps messages per connection per second, preventing resource exhaustion while preserving legitimate functionality.

critical

How Remote Code Execution Happens in Handlebars Template Compilation and How to Fix It

CVE-2026-33937 is a critical remote code execution vulnerability in Handlebars.js that allows attackers to execute arbitrary code by passing maliciously crafted Abstract Syntax Tree (AST) objects to the compile() function. The vulnerability was patched in version 4.7.9, and we've upgraded to protect against this threat vector.