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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| huggingface | transformers | ≤ 5.15.0 | — |
References
- GitHub Issue #47176 issue-tracking
- GitHub Issue #47177 issue-tracking
- https://github.com/huggingface/transformers product
- get_checkpoint_shard_files in src/transformers/utils/hub.py technical-description
- VulnCheck Advisory: Hugging Face Transformers Path Traversal via Checkpoint Index third-party-advisory