{"cve":"CVE-2024-2952","nvd":{"published":"2024-04-10T17:15:54.823","modified":"2026-06-17T07:25:53.840","status":"Analyzed","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-76"],"references":["https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3","https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4","https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3","https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4"],"products":["litellm:litellm"],"source":"nvd","synced_at":"2026-10-19T21:48:32.179249784+00:00"},"epss":{"cve":"CVE-2024-2952","score":0.01267,"percentile":0.69762,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-46cm-pfwv-cgf8","url":"https://osv.dev/vulnerability/GHSA-46cm-pfwv-cgf8","summary":"LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint","modified":"2026-09-10T03:50:11.252627712Z","packages":[{"ecosystem":"PyPI","name":"litellm","purl":"pkg:pypi/litellm","ranges":["<1.34.42"],"fixed":["1.34.42"]}]},{"id":"PYSEC-2026-387","url":"https://osv.dev/vulnerability/PYSEC-2026-387","summary":"LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint","modified":"2026-07-01T20:22:56.238364Z","packages":[{"ecosystem":"PyPI","name":"litellm","purl":"pkg:pypi/litellm","ranges":["<1.34.42"],"fixed":["1.34.42"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}