Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-31218: n/a

0
Unknown
VulnerabilityCVE-2026-31218cvecve-2026-31218
Published: Tue May 12 2026 (05/12/2026, 00:00:00 UTC)
Source: CVE Database V5

Description

The _load_model() function in the neural_magic_training.py script of the optimate project in commit a6d302f912b481c94370811af6b11402f51d377f (2024-07-21) is vulnerable to insecure deserialization (CWE-502). When loading a model state dictionary from a state_dict.pt file via torch.load(), the function does not enable the weights_only=True security parameter. This allows the deserialization of arbitrary Python objects through the Pickle module. A remote attacker can exploit this by providing a maliciously crafted state_dict.pt file within a directory specified via the --model argument, leading to arbitrary code execution during the deserialization process on the victim's system.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/12/2026, 16:08:11 UTC

Technical Analysis

CVE-2026-31218 describes an insecure deserialization vulnerability in the _load_model() function of the optimate project. The function loads a model state dictionary from a state_dict.pt file using torch.load() but does not enable the weights_only=True parameter, which is intended to restrict deserialization to tensor weights only. Because torch.load() uses Python's Pickle module internally, this omission allows an attacker to craft a malicious state_dict.pt file that can execute arbitrary Python code during deserialization. The attack vector involves specifying a directory containing the malicious file via the --model argument, leading to code execution on the victim's system.

Potential Impact

Successful exploitation results in arbitrary code execution on the victim's system during model loading. This can lead to full system compromise depending on the privileges of the process running the script. There are no known exploits in the wild at this time.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid loading untrusted or unauthenticated state_dict.pt files. Applying the weights_only=True parameter in torch.load() calls is recommended to mitigate this vulnerability once a patch or update is released.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
mitre
Date Reserved
2026-03-09T00:00:00.000Z
Cvss Version
null
State
PUBLISHED
Remediation Level
null

Threat ID: 6a034c84cbff5d8610fe99da

Added to database: 5/12/2026, 3:51:32 PM

Last enriched: 5/12/2026, 4:08:11 PM

Last updated: 5/13/2026, 4:57:57 AM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses