Skip to main content
← All vulnerabilities
CVE-2024-2952PYSEC-2026-387GHSA-46CM-PFWV-CGF8

Server-Side Template Injection in BerriAI/litellm

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.34.42
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • berriai berriai/litellm

    fixed in 1.34.42

  • litellmPyPI

    fixed in 1.34.42

  • litellmPyPI

    fixed in 1.34.42

References 2

huntr.com

GitHub · berriai/litellm