PyPI: scikit-learn
CVE-2024-5206
Safety vulnerability ID: SFTY-20240606-63808
Safety legacy ID: pyup.io-71596
A sensitive data leakage vulnerability was identified in affected versions of scikit-learn TfidfVectorizer. 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.
Overview
scikit-learn sensitive data leakage vulnerability
Advisory
A sensitive data leakage vulnerability was identified in affected versions of scikit-learn TfidfVectorizer. 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.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20240606-63808/CVE-2024-5206
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-5206
- https://github.com/advisories/GHSA-jw8x-6495-233v
- https://huntr.com/bounties/14bc0917-a85b-4106-a170-d09d5191517c
- https://www.suse.com/security/cve/CVE-2024-5206.html
- https://nvd.nist.gov/vuln/detail/CVE-2024-5206
- https://github.com/scikit-learn/scikit-learn/commit/70ca21f106b603b611da73012c9ade7cd8e438b8
- https://huntr.com/bounties/14bc0917-a85b-4106-a170-d09d5191517c
- https://github.com/pypa/advisory-database/tree/main/vulns/scikit-learn/PYSEC-2024-110.yaml
- https://github.com/advisories/GHSA-jw8x-6495-233v
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
