CVE-2026-66007
Received Received - Intake

Path Traversal in Datasets Through 5.0.0

Vulnerability report for CVE-2026-66007, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-24

Last updated on: 2026-07-24

Assigner: VulnCheck

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 Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-24
Last Modified
2026-07-24
Generated
2026-07-24
AI Q&A
2026-07-24
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
huggingface datasets 5.0.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a path traversal vulnerability in Hugging Face's datasets library (versions up to 5.0.0). It occurs in folder-based dataset builders where the file_name metadata field is not properly validated before being joined to the dataset directory. Attackers can craft file_name values with directory traversal sequences like ../ to read arbitrary local files. These files are then embedded into output when functions like save_to_disk or push_to_hub are called.

Detection Guidance

To detect this vulnerability, inspect datasets using folder-based builders (imagefolder, audiofolder, videofolder, pdffolder) for metadata files (metadata.jsonl, metadata.csv, metadata.parquet) containing file_name fields with path traversal sequences like ../ or absolute paths. Check for suspicious file reads during save_to_disk or push_to_hub operations.

Impact Analysis

If you use affected versions of the Hugging Face datasets library, an attacker could create a malicious dataset that reads sensitive files from your system when you load it. These files could then be included in any output generated by save_to_disk or push_to_hub, potentially exposing confidential data. The impact includes unauthorized file access and potential data leakage.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive personal or health data, violating GDPR and HIPAA requirements for data protection and confidentiality. Organizations using affected versions may face compliance violations, legal penalties, and reputational damage due to potential data breaches resulting from this flaw.

Mitigation Strategies

Update the Hugging Face datasets library to a version containing the fix (commit f989ef9 or later). Validate file_name fields in metadata to ensure they resolve within the dataset directory using os.path.realpath and os.path.commonpath. Remove any datasets with malicious file_name values.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-66007. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart