Vulnerability · Published Jun 6, 2024 · Assigned by @huntr_ai

CVE-2024-5206Sensitive Data Leakage in sklearn.feature_extraction.text.TfidfVectorizer in scikit-learn/scikit-learn

Medium 4.7

In plain English

A medium-severity security flaw in scikit-learn/scikit-learn from scikit-learn. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)4.7Medium
Exploit odds (30 days)0.2%top 91.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

A sensitive data leakage vulnerability was identified in scikit-learn's TfidfVectorizer, specifically in versions up to and including 1.4.1.post1, which was fixed in version 1.5.0. The vulnerability arises 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. This behavior leads to the potential leakage of sensitive information, as the `stop_words_` attribute could contain tokens that were meant to be discarded and not stored, such as passwords or keys. The impact of this vulnerability varies based on the nature of the data being processed by the vectorizer.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12scikit-learnno fix listedDEBIAN-CVE-2024-5206
Debian:13scikit-learnno fix listedDEBIAN-CVE-2024-5206
Debian:14scikit-learnno fix listedDEBIAN-CVE-2024-5206
PyPIscikit-learn1.5.0GHSA-jw8x-6495-233v
PyPIscikit-learn1.5.0PYSEC-2024-110
Ubuntu:22.04:LTSscikit-learnno fix listedUBUNTU-CVE-2024-5206
Ubuntu:24.04:LTSscikit-learnno fix listedUBUNTU-CVE-2024-5206
Ubuntu:25.10scikit-learnno fix listedUBUNTU-CVE-2024-5206
Ubuntu:26.04:LTSscikit-learnno fix listedUBUNTU-CVE-2024-5206
Ubuntu:26.10scikit-learnno fix listedUBUNTU-CVE-2024-5206

Affected products (as reported)

VendorProductVersions
scikit-learn scikit-learn/scikit-learn unspecified – before 1.5.0

Weakness: CWE-921 · Vector: CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

References