CVE-2026-145674 in LiteLLM
Summary
by MITRE • 12/06/2026
BerriAI LiteLLM from 1.65.5 before 1.85.0 contains a reflected cross-site scripting vulnerability in the unauthenticated /sso/debug/callback endpoint, which reflects identity-provider fields into an inline script block via json.dumps without HTML escaping. Attackers with an IdP account can set a claim such as a display name containing </script>, complete the SSO flow, and send the callback URL to a proxy admin to steal session cookies and take over the account.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 12/06/2026
The vulnerability identified in LiteLLM versions prior to 1.85.0 represents a critical reflected cross-site scripting flaw located within the unauthenticated /sso/debug/callback endpoint. This security defect stems from improper neutralization of user-controllable input before it is placed into an HTML context, specifically when rendering identity provider fields directly into inline script blocks. The root cause lies in the use of json.dumps without subsequent HTML escaping or content type negotiation that would prevent browser interpretation as executable code. When a victim interacts with this endpoint, any special characters present in the returned data are not sanitized, allowing malicious scripts to be injected and executed within the context of the application's domain.
The attack vector requires an attacker who possesses valid credentials for an external identity provider integrated with LiteLLM. By manipulating claims such as the display name field during the SSO authentication process, the adversary can inject payload strings containing closing script tags followed by arbitrary JavaScript code. Once these malicious values are stored in the identity provider's profile and subsequently retrieved via the callback endpoint, they are reflected back into the response body embedded within a script tag. This mechanism bypasses standard browser security checks because the injection occurs inside an already active scripting context rather than being treated as plain text or attribute content.
The operational impact of this vulnerability is severe, particularly for administrators who utilize the SSO integration features. An attacker can craft a malicious callback URL containing their injected payload and trick a proxy administrator into accessing it through social engineering tactics such as phishing emails or deceptive links. Upon execution within the victim's browser session, the script gains access to sensitive data including session cookies, authentication tokens, and potentially other user-specific information stored in local storage or cookies. This capability allows for complete account takeover, enabling the attacker to impersonate the administrator and perform unauthorized actions with full administrative privileges across the LiteLLM deployment.
From a classification perspective, this vulnerability aligns closely with CWE-79 Improper Neutralization of Input During Web Page Generation known as Cross-site Scripting. The specific mechanism reflects input directly into an HTML script context without proper encoding, which is characteristic of reflected XSS attacks where the payload is immediately returned in the HTTP response rather than being stored persistently in a database. In terms of adversary behavior mapping to MITRE ATT&CK techniques, this scenario exemplifies T1059 Command and Scripting Interpreter through browser-based JavaScript execution and potentially T1534 Internal Spearphishing if used for lateral movement within an organization's infrastructure by compromising administrative accounts.
Mitigation strategies should prioritize immediate upgrading of the LiteLLM software to version 1.85.0 or later where this issue has been addressed in upstream codebases. For environments unable to upgrade immediately, implementing a Web Application Firewall rule that detects and blocks script tag injections within query parameters or callback responses can provide temporary protection. Additionally, enforcing strict Content Security Policy headers with nonces or hashes for inline scripts will prevent unauthorized JavaScript execution even if injection occurs. Administrators should also review logging mechanisms to detect unusual patterns in SSO callbacks and restrict access to debug endpoints like /sso/debug/callback by removing them from production environments entirely since they are intended solely for development purposes.