CVE-2026-66007 Datasets Path Traversal via Unsanitized file_name Metadata
Attackers can read arbitrary local files via crafted metadata in Hugging Face Datasets library, exposing sensitive data during dataset saving or pushing.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-66007?
CVE-2026-66007 is a medium-severity path traversal vulnerability in huggingface datasets, published on 24 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
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.
Weakness: CWE-22
Which versions are affected by CVE-2026-66007?
3 open source packages ship an affected version, including datasets. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
datasets PyPI | All versions | 5.0.1 |
datasets PyPI | All versions | 5.0.1 |
datasets PyPI | All versions | 5.0.1 |
Products include Huggingface Datasets.
How do I fix CVE-2026-66007?
Upgrade datasets to 5.0.1 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-66007 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-66007 exists.
Sources
Also known as GHSA-379c-qx7v-6h59, PYSEC-2026-3716.