Vulnerability · Published Jul 24, 2026 · Assigned by VulnCheck
CVE-2026-66007Datasets Path Traversal via Unsanitized file_name Metadata
Medium 6.5
In plain English
A medium-severity path traversal in datasets from huggingface. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Datasets through 5.0.0, fixed in commit f989ef9, contains a path traversal vulnerability in folder-based dataset builders where the file_name metadata field is not properly validated before being joined to the dataset directory. Attackers can supply crafted file_name values with directory traversal sequences to read arbitrary local files, which are then embedded into output when save_to_disk or push_to_hub is called.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | datasets | 5.0.1 | GHSA-379c-qx7v-6h59 |
| PyPI | datasets | 5.0.1 | PYSEC-2026-3716 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| huggingface | datasets | 0 – through 5.0.0 |
Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
References
- Researcher Disclosure technical-description, exploit, issue-tracking
- Pull Request issue-tracking, patch
- Patch Commit patch
- https://www.vulncheck.com/advisories/datasets-path-traversal-via-unsanitized-file-name-metadata third-party-advisory