Intel

AIKIDO-2026-587816

huggingface-hub is vulnerable to Path Traversal

Path TraversalCVE-2026-15717 Published Jul 31, 2026

83

High Risk

This Affects:

PYTHONhuggingface-hub
0.23.0 - 1.25.1
Fixed in 1.26.0
Are you affected? Scan for Free

TL;DR

get_local_download_paths() and get_local_upload_paths() in _local_folder.py map Hub filenames into a caller-supplied local_dir after only a Windows-only ..\ string check, with no rejection of absolute, drive-relative, root-relative, or UNC names. On Windows, joining an anchored filename discards the destination root, so a malicious repository can write outside the intended directory or trigger an SMB connection that leaks a NetNTLMv2 hash. Separately, Sandbox.create injects the caller's HF token as SBX_DL_TOKEN into the job environment to download sbx-server, even when forward_hf_token=False, so a hostile sandbox image can read the credential before the bootstrap unsets it. The fix validates filenames with a shared _validate_relative_filename() helper on all platforms and downloads sbx-server anonymously so no HF token enters the job unless the caller opts in with forward_hf_token=True.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you download or upload with local_dir / --local-dir against untrusted Hub repositories, or you create sandboxes via Sandbox.create / SandboxPool without explicitly intending to forward the HF token.

Background info

huggingface-hub is vulnerable to Path Traversal in versions 0.23.0 - 1.25.1.

How to fix this

Upgrade the huggingface-hub library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform