{"id":"CVE-2024-2952","aliases":["GHSA-46cm-pfwv-cgf8","PYSEC-2026-387"],"url":"https://o3.security/vulnerability/CVE-2024-2952","summary":"Server-Side Template Injection in BerriAI/litellm","details":"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 crafting malicious `tokenizer_config.json` files that execute arbitrary code on the server.","published":"2024-04-10T17:07:52.935Z","modified":"2026-08-08T03:48:02.987736772Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"litellm","fixedVersion":"1.34.42"}],"fix":{"url":"https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3","label":"berriai/litellm@8a1cdc9"},"references":[{"type":"WEB","url":"https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/2xxx/CVE-2024-2952.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-2952"},{"type":"FIX","url":"https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-08T03:48:02.987736772Z"}}