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 describes a path traversal vulnerability in huggingface datasets up to version 5.0.0. The vulnerability arises because the file_name metadata field in folder-based dataset builders is not properly sanitized before being joined to the dataset directory path. This allows an attacker to craft file_name values containing directory traversal sequences (e.g., ../) to read arbitrary local files. These files can then be embedded into the dataset output when save_to_disk or push_to_hub methods are invoked. The vulnerability has a CVSS 4.0 score of 6.9 (medium severity). The fix is implemented in commit f989ef9, but no official vendor advisory or patch link is provided in the data.
Potential Impact
An attacker can exploit this vulnerability to read arbitrary local files on the system where the huggingface datasets library is used. The arbitrary file contents may be embedded into dataset outputs, potentially exposing sensitive information. There is no indication of privilege escalation or remote code execution. The vulnerability requires user interaction (UI:A) and no privileges (PR:N) but can be triggered remotely (AV:N).
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability is fixed in commit f989ef9, so upgrading to a version including this fix is recommended once available. Until then, avoid processing untrusted datasets that may contain malicious file_name metadata. Monitor official huggingface channels for an official patch or updated release addressing this issue.
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 describes a path traversal vulnerability in huggingface datasets up to version 5.0.0. The vulnerability arises because the file_name metadata field in folder-based dataset builders is not properly sanitized before being joined to the dataset directory path. This allows an attacker to craft file_name values containing directory traversal sequences (e.g., ../) to read arbitrary local files. These files can then be embedded into the dataset output when save_to_disk or push_to_hub methods are invoked. The vulnerability has a CVSS 4.0 score of 6.9 (medium severity). The fix is implemented in commit f989ef9, but no official vendor advisory or patch link is provided in the data.
Potential Impact
An attacker can exploit this vulnerability to read arbitrary local files on the system where the huggingface datasets library is used. The arbitrary file contents may be embedded into dataset outputs, potentially exposing sensitive information. There is no indication of privilege escalation or remote code execution. The vulnerability requires user interaction (UI:A) and no privileges (PR:N) but can be triggered remotely (AV:N).
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability is fixed in commit f989ef9, so upgrading to a version including this fix is recommended once available. Until then, avoid processing untrusted datasets that may contain malicious file_name metadata. Monitor official huggingface channels for an official patch or updated release addressing this issue.
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/24/2026, 15:22:29 UTC
Last updated: 07/24/2026, 16:18:40 UTC
Views: 5
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.