CVE-2026-31218 Details
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.
A vulnerability exists in the Optimate project, specifically in the neural_magic_training.py script, within commit a6d302f912b481c94370811af6b11402f51d377f. The issue arises in the _load_model() function, which is susceptible to insecure deserialization. When the function loads a model state dictionary from a state_dict.pt file using torch.load(), it fails to activate the weights_only=True security parameter. This oversight permits the deserialization of arbitrary Python objects via the Pickle module. A remote attacker could exploit this vulnerability by supplying a maliciously crafted state_dict.pt file in a directory specified with the --model argument, leading to arbitrary code execution during the deserialization process on the victim's system.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 12, 2026CISA-ADP
Assessed May 15, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/nebuly-ai/optimate | [email protected] | Source CodeVendor |
| https://www.notion.so/CVE-2026-31218-35d1e139318881839bc8cf6007be2c76 | [email protected] | Not Applicable |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-502 | Deserialization of Untrusted Data | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| Nebuly AI Optimate | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 15, 2026 | CVE Modified | CISA-ADP |
| May 12, 2026 | New CVE Received | [email protected] |
Volerion