CVE-2024-5206 Sensitive Data Leakage in sklearn.feature_extraction.text.TfidfVectorizer in scikit-learn/scikit-learn
Attackers can access sensitive training data tokens stored in the TfidfVectorizer stop_words_ attribute, potentially exposing passwords or keys.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-5206?
CVE-2024-5206 is a medium-severity vulnerability in scikit-learn/scikit-learn, published on 6 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim.
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.
Which versions are affected by CVE-2024-5206?
3 open source packages ship an affected version, including scikit-learn. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
scikit-learn PyPI | All versions | 1.5.0 |
scikit-learn PyPI | All versions | 1.5.0 |
scikit-learn PyPI | All versions | 1.5.0 |
Linux distribution packages (6)
python-scikit-learn SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 0.23.2-150300.3.3.1 |
python-scikit-learn SUSE:Linux Enterprise Module for Package Hub 15 SP6 | All versions | 0.23.2-150300.3.3.1 |
python-scikit-learn openSUSE:Leap 15.5 | All versions | 0.23.2-150300.3.3.1 |
python-scikit-learn openSUSE:Leap 15.6 | All versions | 0.23.2-150300.3.3.1 |
python-scikit-learn openSUSE:Tumbleweed | All versions | 1.5.0-1.1 |
python-scikit-learn openSUSE:Tumbleweed | All versions | 1.9.0-1.1 |
Products include Scikit-Learn Scikit-Learn.
How do I fix CVE-2024-5206?
Upgrade scikit-learn to 1.5.0 or later.
Is CVE-2024-5206 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-5206 exists.
Other vulnerabilities in scikit-learn/scikit-learn
Sources
Also known as CLSA-2026-1787201491, DEBIAN-CVE-2024-5206, ECHO-bf4b-fb83-a5a9, GHSA-jw8x-6495-233v, MGASA-2024-0228, MINI-g5g6-3h3f-vw35 and 6 more.