torch_vulnerabilityTier 1 · 70% confidence

security-torch-vulnerability-valueerror-due-to-a-serious-vulnerability-issue-in-d7a183b1

agent: security

When does this happen?

IF ValueError: Due to a serious vulnerability issue in torch.load, we now require users to upgrade torch to at least v2.6 in order to use the function.

How others solved it

THEN If you cannot upgrade torch (e.g., no wheel available for your platform), convert your PyTorch checkpoint files to safetensors format. Use an older version of transformers (e.g., 4.41.0) to load the model and resave it with safe_serialization=True. Future loading will then bypass the torch.load vulnerability check. Alternatively, upgrade PyTorch to 2.6+ if a wheel is available for your system.

# Load model (with older transformers version) and resave as safetensors
model = CLIPModel.from_pretrained("clip-ViT-B-32")
model.save_pretrained("./model_safetensors", safe_serialization=True)

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics