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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | scikit-learn | no fix listed | DEBIAN-CVE-2024-5206 |
| Debian:13 | scikit-learn | no fix listed | DEBIAN-CVE-2024-5206 |
| Debian:14 | scikit-learn | no fix listed | DEBIAN-CVE-2024-5206 |
| PyPI | scikit-learn | 1.5.0 | GHSA-jw8x-6495-233v |
| PyPI | scikit-learn | 1.5.0 | PYSEC-2024-110 |
| Ubuntu:22.04:LTS | scikit-learn | no fix listed | UBUNTU-CVE-2024-5206 |
| Ubuntu:24.04:LTS | scikit-learn | no fix listed | UBUNTU-CVE-2024-5206 |
| Ubuntu:25.10 | scikit-learn | no fix listed | UBUNTU-CVE-2024-5206 |
| Ubuntu:26.04:LTS | scikit-learn | no fix listed | UBUNTU-CVE-2024-5206 |
| Ubuntu:26.10 | scikit-learn | no fix listed | UBUNTU-CVE-2024-5206 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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