CVE-2024-2952
Litellm ≤ 1.34.42
Raw vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2024-2952 is a critical-severity Improper Neutralization of Equivalent Special Elements (CWE-76) vulnerability in Litellm. Its CVSS base score is 9.8 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Command Obfuscation (T1027.010); ranked in the top 30% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
This vulnerability is AI-related — categorised as APIs and Models; in the Supply Chain and Deployment risk domain.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2024-1088
Vulnerability Data
BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the `/completions` endpoint. The vulnerability arises from the `hf_chat_template` method processing the `chat_template` parameter from the `tokenizer_config.json` file through the Jinja template engine without proper sanitization. Attackers can exploit this by…
more
crafting malicious `tokenizer_config.json` files that execute arbitrary code on the server.
- CWE(s)
AI Security AnalysisAI
- AI Category
- APIs and Models
- Risk Domain
- Supply Chain and Deployment
- OWASP Top 10 for LLMs 2025
- None mapped
- Classification Reason
- BerriAI/litellm is a proxy server and SDK for unifying LLM APIs, handling /completions endpoints and processing HuggingFace tokenizer_config.json for chat templates.
Related Threats
MITRE ATT&CK Enterprise Techniques
MITRE ATT&CK v20.0
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5)
Our mappings, made for this CVE.
SA-11 requires developer testing and evaluation that can discover failures to neutralize equivalent special elements.
SI-10 requires validation of information inputs, directly stopping incomplete neutralization of equivalent special elements.
SA-8 mandates security engineering principles such as complete input validation and sanitization that cover equivalent special-element forms.
Mitigating Controls (NIST CSF 2.0)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.
Secure SDLC practices directly require consistent neutralization of all equivalent special elements during input validation and sanitization.
Mitigating Controls (ISO/IEC 27001:2022 Annex A)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.
Security testing can detect incomplete neutralization but does not prevent the weakness itself.
Training helps some developers recognize that special elements have equivalent forms (alternate encodings, alternate switches) and broaden their neutralization logic, but the weakness is a subtle, specialized implementation defect where the developer's mental model of what to filter is incomplete — a knowledge gap training reaches only partially, with most instances still arising from developers who have not internalized the equivalence problem.
Secure coding standards directly address proper neutralization of all equivalent special elements.
A.8.30's contractual requirements (acceptance testing per 8.29, evidence of testing against malicious content and known vulnerabilities) ensure the supplier's testing programme is in place, and that programme would discover some instances of CWE-76 through security testing, but A.8.30 is a contractual wrapper that delegates the actual testing, and CWE-76's equivalent-encoding variants require specific test-case design that a generic testing mandate does not guarantee.