CVE-2026-31218: n/a
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 Analysis
Technical Summary
The vulnerability in CVE-2026-31218 involves insecure deserialization (CWE-502) in the _load_model() function of the optimate project's neural_magic_training.py script. Specifically, the function loads a model state dictionary from a state_dict.pt file using torch.load() without the weights_only=True parameter, which is intended to restrict deserialization to tensor weights only. Without this restriction, the Pickle module can deserialize arbitrary Python objects, enabling remote attackers to execute arbitrary code by supplying a maliciously crafted state_dict.pt file via the --model argument. The vulnerability has a CVSS 3.1 base score of 8.8, indicating high severity with network attack vector, low attack complexity, requiring low privileges and no user interaction, and impacts confidentiality, integrity, and availability.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary code on the victim's system during the deserialization process of a malicious state_dict.pt file. This can lead to full compromise of the affected system, including unauthorized access, data manipulation, and denial of service. The vulnerability affects the optimate project when loading model files without proper deserialization safeguards.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading untrusted or unauthenticated state_dict.pt files with the vulnerable _load_model() function. If possible, manually modify the code to enable the weights_only=True parameter in torch.load() to restrict deserialization to tensor weights only, mitigating arbitrary code execution risks.
CVE-2026-31218: n/a
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.
CVSS v3.1
Score 8.8high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in CVE-2026-31218 involves insecure deserialization (CWE-502) in the _load_model() function of the optimate project's neural_magic_training.py script. Specifically, the function loads a model state dictionary from a state_dict.pt file using torch.load() without the weights_only=True parameter, which is intended to restrict deserialization to tensor weights only. Without this restriction, the Pickle module can deserialize arbitrary Python objects, enabling remote attackers to execute arbitrary code by supplying a maliciously crafted state_dict.pt file via the --model argument. The vulnerability has a CVSS 3.1 base score of 8.8, indicating high severity with network attack vector, low attack complexity, requiring low privileges and no user interaction, and impacts confidentiality, integrity, and availability.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary code on the victim's system during the deserialization process of a malicious state_dict.pt file. This can lead to full compromise of the affected system, including unauthorized access, data manipulation, and denial of service. The vulnerability affects the optimate project when loading model files without proper deserialization safeguards.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading untrusted or unauthenticated state_dict.pt files with the vulnerable _load_model() function. If possible, manually modify the code to enable the weights_only=True parameter in torch.load() to restrict deserialization to tensor weights only, mitigating arbitrary code execution risks.
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: 05/12/2026, 15:51:32 UTC
Last enriched: 05/19/2026, 18:19:20 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 39
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.