CVE-2024-2952

Server-Side Template Injection in BerriAI/litellm

CRITICAL 9.8

At a glance

Source
NVD
EPSS
EPSS 1.27 % · percentile 70 ()
State
PUBLISHED
Published
Updated
Assigner
@huntr_ai
NVD 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.

Weaknesses (CWE)

  • CWE-76 — Improper Neutralization of Equivalent Special Elements

References

Scores

VersionScoreVectorScored by
CVSS 3.0CRITICAL 9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H@huntr_ai
CVSS 3.0CRITICAL 9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HNVD · security@huntr.dev (Secondary)

Advisories

European references

Affected configurations (NVD CPE)

Affected products

ProductVersions
berriai · berriai/litellmaffected unspecified < 1.34.42

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD