PyPI: litellm

CVE-2026-35030

Safety vulnerability ID: SFTY-20260403-69249

Safety legacy ID: pyup.io-91741

Affected versions of the litellm package are vulnerable to Authentication Bypass due to the use of an insufficiently unique cache key derived from only the first 20 characters of a JWT token in the OIDC userinfo cache. When JWT authentication is enabled, the cache key is computed as token[:20], and because JWT headers produced by the same signing algorithm generate identical prefixes, an attacker can craft a token whose first 20 characters collide with a legitimate cached entry. This allows an unauthenticated attacker to inherit the identity and permissions of a legitimate user on cache hit, resulting in full authentication bypass on deployments with JWT/OIDC authentication enabled.

Created at: Apr 7, 2026Updated at: Apr 7, 2026

Overview

LiteLLM: Authentication bypass via OIDC userinfo cache key collision

Advisory

Affected versions of the litellm package are vulnerable to Authentication Bypass due to the use of an insufficiently unique cache key derived from only the first 20 characters of a JWT token in the OIDC userinfo cache. When JWT authentication is enabled, the cache key is computed as token[:20], and because JWT headers produced by the same signing algorithm generate identical prefixes, an attacker can craft a token whose first 20 characters collide with a legitimate cached entry. This allows an unauthenticated attacker to inherit the identity and permissions of a legitimate user on cache hit, resulting in full authentication bypass on deployments with JWT/OIDC authentication enabled.

Affected Package

Affecting litellm package, versions
<1.83.0

Also affects

---

How to Fix

Upgrade
litellm
to
1.83.0
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more