Description
Hugging Face Transformers fails to validate shard filenames in checkpoint index files, allowing attackers to read arbitrary files outside the model directory. Attackers can supply malicious index files with parent-directory references or absolute paths that are joined without validation, enabling file disclosure and filesystem reconnaissance.
Severity (CVSS)
| Base score | 6.8 |
|---|---|
| Severity | Medium |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| huggingface | transformers | 0 to <=5.15.0 |
References
- https://github.com/huggingface/transformers/issues/47176 (issue-tracking)
- https://github.com/huggingface/transformers/issues/47177 (issue-tracking)
- https://github.com/huggingface/transformers (product)
- https://github.com/huggingface/transformers/blob/main/src/transformers/utils/hub.py (technical-description)
- https://www.vulncheck.com/advisories/hugging-face-transformers-path-traversal-via-checkpoint-index (third-party-advisory)
Generated from the official CVE List on 18 Aug 2026 07:05 UTC.