INCIDENT MAP

Browse / Sensitive Data Disclosure / CVE-2024-9606

LiteLLM Reveals Portion of API Key via a Logging File

CVE-2024-9606 ยท 2025-03-20 high

Class
Sensitive Data Disclosure (filed by a model that read the advisory)
Technique
Information exposure
Affected
litellm (PyPI)
CVSS
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
0.8% chance of exploitation in 30 days

How it works, in short

Logging code masks only the first five characters of API keys, so nearly the whole key is written to log files. (Our summary, written by a model. The source text is below.)

Details

In berriai/litellm before version 1.44.12, the litellm/litellm_core_utils/litellm_logging.py file contains a vulnerability where the API key masking code only masks the first 5 characters of the key. This results in the leakage of almost the entire API key in the logs, exposing a significant amount of the secret key. The issue affects version v1.44.9.

References

Source: GitHub Advisory Database, used under CC BY 4.0.