Skip to content
HighVulnerability

CVE-2026-31218: optimate insecure deserialization in _load_model() via torch.load()

Identifier
CVE-2026-31218
Published
Record updated
View JSON
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.6%

Summary

The _load_model() function in the neural_magic_training.py script of the optimate project, at commit a6d302f912b481c94370811af6b11402f51d377f (2024-07-21), is affected by insecure deserialization (CWE-502). It calls torch.load() on a state_dict.pt file without setting weights_only=True, so arbitrary Python objects can be deserialized through the Pickle module. A remote attacker who supplies a crafted state_dict.pt in a directory passed via the --model argument can execute arbitrary code on the victim's system during deserialization.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.