CVE-2024-9606 Improper Output Neutralization for Logs in berriai/litellm

High 7.5 Published Updated

Attackers can read sensitive API keys from logs because the masking logic only hides the first five characters of the key.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-9606?

CVE-2024-9606 is a high-severity vulnerability in berriai/litellm, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-116, CWE-117

Which versions are affected by CVE-2024-9606?

3 open source packages ship an affected version, including litellm. It affects 1 product.

PackageAffectedFixed in
litellm PyPIAll versions1.44.12
litellm PyPIAll versions1.44.12
litellm PyPIAll versions1.44.12

Products include Litellm Litellm.

How do I fix CVE-2024-9606?

Upgrade litellm to 1.44.12 or later.

Is CVE-2024-9606 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-9606 exists.

Sources

Also known as GHSA-g5pg-73fc-hjwq, PYSEC-2026-1548.

Is CVE-2024-9606 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free