Intel

AIKIDO-2026-285573

huggingface-hub is vulnerable to Insecure Deserialization

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Sep 23, 2026
September 23, 2026

88

CVE Score

High

Insecure Deserialization

Are you affected? Scan for Free

TL;DR

serialization/_torch.py loads Torch checkpoint files through pickle based deserialization without restricting the objects that get unpickled by default. A checkpoint file from a source that is not fully trusted can embed pickle opcodes that execute code as soon as the checkpoint is loaded. The loader also skips validating certain shard/index values before loading, letting a crafted checkpoint reach an unsafe combination of loading options. The fix switches the default to safe/restricted loading, validates the indexes, and rejects unsafe option combinations.

How do I fix this?

Upgrade the huggingface-hub library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you load a Torch checkpoint file that did not originate from a source you fully trust.

Versions

0.27.0 - 1.31.0

Fixed in 1.32.0

Background info

huggingface-hub is vulnerable to Insecure Deserialization in versions 0.27.0 - 1.31.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea