# CVE-2024-5206: Sensitive Data Leakage in sklearn.feature\_extraction.text.TfidfVectorizer in scikit-learn/scikit-learn

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.0, CNA) `CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 9, 2026-11-26)
- **CWE:** CWE-921
- **Aliases:** GHSA-jw8x-6495-233v, PYSEC-2024-110
- **Published:** 2024-06-06T18:28:14.267Z
- **Modified:** 2026-09-10T03:50:15.628Z

## Who should check

- Projects that depend on PyPI package scikit-learn (\< 1.5.0)
- Anyone running scikit-learn/scikit-learn \>= unspecified, \< 1.5.0

## 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 and fixed versions

- PyPI `scikit-learn`: affected \< 1.5.0; fixed 1.5.0 (osv)
- scikit-learn/scikit-learn: \>= unspecified, \< 1.5.0 (cvelist)

## Mitigation

- Upgrade scikit-learn to 1.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-5206. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-5206.md
Affected: scikit-learn < 1.5.0
Fixed in: 1.5.0

Steps:
1. Search this machine and project for scikit-learn (PyPI), scikit-learn/scikit-learn: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-5206 being exploited?

There is no confirmed exploitation: CVE-2024-5206 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-5206?

Medium: CVSS 4.7 (v3.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2024-5206?

scikit-learn \< 1.5.0.

### Is there a fix for CVE-2024-5206?

Yes. Fixed in 1.5.0. Upgrade scikit-learn to 1.5.0 or later.

### How do I check if I'm affected by CVE-2024-5206?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-5206>
- vendor: <https://github.com/advisories/GHSA-jw8x-6495-233v>
- patch: <https://github.com/scikit-learn/scikit-learn/commit/70ca21f106b603b611da73012c9ade7cd8e438b8>
- other: <https://huntr.com/bounties/14bc0917-a85b-4106-a170-d09d5191517c>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/scikit-learn/PYSEC-2024-110.yaml>
- other: <https://github.com/scikit-learn/scikit-learn>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-5206>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-jw8x-6495-233v> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2024-110> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-5206> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-5206>
