BreachSpiderVerified, not vibes

CVE-2026-31218 in Pickle products

High 8.8

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...

Affects 0 products from 4 vendors. Facts below cite their sources.

CVSS 3.18.8
EPSS0.8%
EPSS percentile54th
FixUnknown

Remotely exploitable over the network, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Pickle — —
Project — —
Python — —
Script — —

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2026-31218
BreachSpider IDBS-2026-GLOBAL-080157-H
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published2026-05-12
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-502: Deserialization of Untrusted Data

Software deserializes untrusted data without validation, allowing crafted objects to execute arbitrary code.

Related attack patterns (CAPEC)

CAPEC-586 Object Injection via CWE-502

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

The _load_model() function in the neural_magic_training.py script of the optimate project is vulnerable to insecure deserialization due to the absence of the weights_only=True parameter in the torch.load() function call. This vulnerability could allow an attacker to execute arbitrary code if they can control the contents of the state_dict.pt file.

An attacker can exploit this vulnerability by crafting a malicious state_dict.pt file that, when deserialized, executes arbitrary code on the system. The attack requires the attacker to have the ability to place or modify the state_dict.pt file in a location where the _load_model() function will load it.

Questions

What is CVE-2026-31218?

The _load_model() function in the neural_magic_training.py script of the optimate project is vulnerable to insecure deserialization due to the absence of the weights_only=True parameter in the torch.load() function call. This vulnerability could allow an attacker to execute arbitrary code if they can control the contents of the state_dict.pt file.

What is the CVSS score for CVE-2026-31218?

CVE-2026-31218 has CVSS 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 0.8%.

Is CVE-2026-31218 actively exploited?

No confirmed active exploitation of CVE-2026-31218 as of 2026-09-25.

How do I remediate CVE-2026-31218?

Priority: IMMEDIATE.

What systems are affected by CVE-2026-31218?

CVE-2026-31218 affects Pickle; Project; Python; Script.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Pickle","product":"EDS-518A","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.