{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-2952","id":"CVE-2024-2952","title":"Server-Side Template Injection in BerriAI/litellm","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 ar","descriptionLong":"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","updated":"2026-10-28T02:30:22.180953243Z","reserved":"2024-03-26T18:00:46.844Z","status":"Analyzed","rejected":false,"assigner":"@huntr_ai","metric":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"@huntr_ai"},"metrics":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"@huntr_ai"},{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"huntr.dev"},{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["berriai/litellm"],"affectedProducts":[{"vendor":"berriai","product":"berriai/litellm","defaultStatus":null,"versions":[{"version":"unspecified","lessThan":"1.34.42","status":"affected","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"litellm","purl":"pkg:pypi/litellm","ranges":["<1.34.42"],"fixed":["1.34.42"],"advisory":"GHSA-46cm-pfwv-cgf8"}],"cwes":["CWE-76"],"aliases":["GHSA-46cm-pfwv-cgf8","PYSEC-2026-387"],"references":[{"url":"https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4","tags":["x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3","tags":["x_transferred","Patch","fix"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/2xxx/CVE-2024-2952.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-2952","tags":["advisory"]},{"url":"https://github.com/BerriAI/litellm/issues/2949","tags":["web"]},{"url":"https://github.com/BerriAI/litellm/pull/2941","tags":["web"]},{"url":"https://github.com/BerriAI/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3","tags":["web"]},{"url":"https://github.com/BerriAI/litellm","tags":["package"]},{"url":"https://github.com/BerriAI/litellm/blob/0d803e13798db40aa7463e64a6bafaee386424f5/litellm/proxy/proxy_server.py#L2087","tags":["web"]},{"url":"https://github.com/advisories/GHSA-46cm-pfwv-cgf8","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/litellm/PYSEC-2026-387.yaml","tags":["web"]},{"url":"https://pypi.org/project/litellm","tags":["web","package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total"},"epss":0.01267,"epssPercentile":0.70341,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-2952","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-2952","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-2952","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-46cm-pfwv-cgf8","ok":true,"note":"GHSA-46cm-pfwv-cgf8"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-2952","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}