CVE-2026-66007: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in huggingface datasets
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.
AI Analysis
Technical Summary
CVE-2026-66007 is a path traversal vulnerability affecting huggingface datasets through version 5.0.0. The vulnerability arises because the file_name metadata field in folder-based dataset builders is not properly validated before being concatenated with the dataset directory path. Attackers can exploit this by supplying crafted file_name values containing directory traversal sequences (e.g., '../') to read arbitrary local files. These files can then be embedded into the output when the dataset is saved to disk or pushed to the hub. The vulnerability was fixed in a commit identified as f989ef9, but no official patch version is specified in the provided data.
Potential Impact
An attacker can read arbitrary local files on the system where the huggingface datasets library is used by exploiting the improper validation of the file_name metadata field. This can lead to unauthorized disclosure of sensitive local files embedded into dataset outputs. The vulnerability requires no privileges and no user interaction but has a medium severity impact according to the CVSS 4.0 score of 6.9.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability was fixed in a commit (f989ef9), so upgrading to a version including this fix is recommended once available. Until then, avoid processing untrusted datasets with folder-based dataset builders or applying save_to_disk or push_to_hub operations on untrusted inputs.
CVE-2026-66007: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in huggingface datasets
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.
CVSS v4.0
Score 6.9medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-66007 is a path traversal vulnerability affecting huggingface datasets through version 5.0.0. The vulnerability arises because the file_name metadata field in folder-based dataset builders is not properly validated before being concatenated with the dataset directory path. Attackers can exploit this by supplying crafted file_name values containing directory traversal sequences (e.g., '../') to read arbitrary local files. These files can then be embedded into the output when the dataset is saved to disk or pushed to the hub. The vulnerability was fixed in a commit identified as f989ef9, but no official patch version is specified in the provided data.
Potential Impact
An attacker can read arbitrary local files on the system where the huggingface datasets library is used by exploiting the improper validation of the file_name metadata field. This can lead to unauthorized disclosure of sensitive local files embedded into dataset outputs. The vulnerability requires no privileges and no user interaction but has a medium severity impact according to the CVSS 4.0 score of 6.9.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability was fixed in a commit (f989ef9), so upgrading to a version including this fix is recommended once available. Until then, avoid processing untrusted datasets with folder-based dataset builders or applying save_to_disk or push_to_hub operations on untrusted inputs.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-23T19:22:30.643Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a637ffa9c2644c7f8203e4f
Added to database: 07/24/2026, 15:08:42 UTC
Last enriched: 07/31/2026, 21:13:16 UTC
Last updated: 09/07/2026, 10:52:10 UTC
Views: 115
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.