CVE-2024-5206
Python vulnerability analysis and mitigation

Overview

A sensitive data leakage vulnerability (CVE-2024-5206) was identified in scikit-learn's TfidfVectorizer, affecting versions up to and including 1.4.1.post1. The vulnerability was fixed in version 1.5.0. The issue stems from the unexpected storage of all tokens present in the training data within the stop_words_ attribute, rather than only storing the subset of tokens required for the TF-IDF technique to function (NVD).

Technical details

The vulnerability arises when the TfidfVectorizer stores all discarded tokens from the training set in its stop_words_ attribute. This includes tokens that were either too frequent (above max_df), too rare (below min_df), or were cut off by feature selection (max_features). The issue has been assigned a CVSS v3.1 base score of 4.7 (MEDIUM) with the vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N (NVD).

Impact

The vulnerability could lead to the potential leakage of sensitive information if the discarded rare tokens contain sensitive data from the training set without the model developer's knowledge. The impact varies based on the nature of the data being processed by the vectorizer (NVD).

Exploitability

The vulnerability requires local access and high complexity to exploit. An attacker would need low privileges and no user interaction to potentially access sensitive information stored in the stop_words_ attribute (NVD).

Mitigation and workarounds

Users are advised to upgrade to scikit-learn version 1.5.0 which fixes this vulnerability. Alternatively, users can either retrain their pipelines with the new scikit-learn version or manually clear the stop_words_ attribute from previously trained instances of the transformers. The attribute was designed only for model inspection purposes and has no impact on the behavior of the transformers (GitHub Patch).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-70646HIGH7.5
  • Python logoPython
  • aiosend
NoYesAug 06, 2026
CVE-2026-71554MEDIUM5.3
  • Python logoPython
  • python-h2
NoYesAug 06, 2026
CVE-2026-71433MEDIUM5.3
  • Python logoPython
  • langgraph-checkpoint-postgres
NoYesAug 06, 2026
CVE-2026-61632MEDIUM5.3
  • Python logoPython
  • pymdown-extensions
NoYesAug 06, 2026
CVE-2026-64640MEDIUM5.3
  • Python logoPython
  • polaris
NoYesAug 06, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management