CVE-2026-66007 Details
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.
A path traversal vulnerability has been identified in the Hugging Face Datasets library, specifically in version 5.0.0 and prior. The issue resides within folder-based dataset builders, such as 'imagefolder', 'audiofolder', 'videofolder', and 'pdffolder'. The vulnerability arises because the 'file_name' metadata field is not adequately validated before being appended to the dataset directory. This oversight allows attackers to craft 'file_name' values that include directory traversal sequences, enabling them to access arbitrary local files. Once these files are read, their contents can be embedded into the output when the 'save_to_disk' or 'push_to_hub' functions are called.
The vulnerability has been fixed in version 5.0.0. Users should update to this version. The patch involves implementing a containment check that ensures 'file_name' values do not escape the dataset directory or reference absolute paths. This check is applied to both local directories and the 'fsspec' URLs used for downloaded archives.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 24, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/huggingface/datasets/commit/f989ef9b4cc6c0039a7a82458eebca49e2b58b4b | [email protected] | Patch |
| https://github.com/huggingface/datasets/issues/8324 | [email protected] | ExploitIssue TrackingVendor Advisory |
| https://github.com/huggingface/datasets/pull/8325 | [email protected] | Issue TrackingPatch |
| https://www.vulncheck.com/advisories/datasets-path-traversal-via-unsanitized-file-name-metadata | [email protected] | ExploitPatchThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| huggingface datasets | <= 5.0.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 17, 2026 | Initial Analysis | [email protected] |
| Jul 24, 2026 | CVE Modified | [email protected] |
| Jul 24, 2026 | CVE Modified | CISA-ADP |
| Jul 24, 2026 | New CVE Received | [email protected] |