Advisory

GHSA-46cm-pfwv-cgf8

Also known as: CVE-2024-2952, PYSEC-2026-387

Summary

LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2024-04-10 18:30 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

litellm

PyPI · All systems

Affected

  • introduced 0, fixed 1.34.42 (ecosystem)

Fixed versions

1.34.42

Fix

  • Fixed version 1.34.42
    pip install --upgrade litellm==1.34.42

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences