Sensitive Data Leakage in sklearn.feature_extraction.text.TfidfVectorizer in scikit-learn/scikit-learn
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-5206
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 16:39 UTC · Revision 1
Source evidence
Sensitive Data Leakage in sklearn.feature_extraction.text.TfidfVectorizer in scikit-learn/scikit-learn
core-osv · Original sourcePublished 6 Jun 2024, 18:28 UTC
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.
osv:CVE-2024-5206
Complete source record
{
"id": "07a2e300e6b45212f52ca7e1e0da0ffe1f8df39b71fb52cb345467cf435b74b4",
"url": "https://osv.dev/vulnerability/CVE-2024-5206",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Sensitive Data Leakage in sklearn.feature_extraction.text.TfidfVectorizer in scikit-learn/scikit-learn",
"summary": "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.",
"evidence": "osv:CVE-2024-5206",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2024-5206",
"aliases": [
"CVE-2024-5206",
"GHSA-jw8x-6495-233v",
"PYSEC-2024-110"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/scikit-learn/scikit-learn",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "b51d0c9648241d1fd53dc9151689f62a61633a3d"
},
{
"fixed": "70ca21f106b603b611da73012c9ade7cd8e438b8"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:scikit-learn:scikit-learn:*:*:*:*:*:python:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.5.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "70ca21f106b603b611da73012c9ade7cd8e438b8"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"0.19-branching",
"0.17-branching",
"0.15-branching",
"0.13-branching",
"0.12-branching",
"0.11-branching",
"0.11-beta",
"0.3",
"0.2",
"0.2-beta",
"0.1",
"0.1-beta"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-5206.json"
}
}
],
"modified": "2026-10-28T02:30:30.495319703Z",
"provider": "osv",
"references": [
"https://huntr.com/bounties/14bc0917-a85b-4106-a170-d09d5191517c",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5206.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-5206",
"https://github.com/scikit-learn/scikit-learn/commit/70ca21f106b603b611da73012c9ade7cd8e438b8"
],
"provider_metadata": {
"cwe_ids": [
"CWE-921"
],
"cna_assigner": "@huntr_ai",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5206.json"
}
},
"related_cves": [
{
"value": "CVE-2024-5206",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 497503,
"published_at": "2024-06-06T18:28:14.267+00:00"
}