CVE-2026-31219: Nebuly AI Optimate insecure deserialization in neural_magic_training.py

CVE-2026-31219 · Severity: info · CVSS 7.8 · Published 2026-05-12

Optimate is an open-source collection of libraries used to optimize the performance of AI models. A security vulnerability in its model-loading script allows for the execution of malicious code when a user attempts to load a specially crafted AI model file. This could lead to a complete compromise of the system running the software if an attacker convinces a user to process a malicious file.

Quick answers

Is CVE-2026-31219 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-31219 being exploited in the wild.
How severe is CVE-2026-31219?
Informational severity, with a CVSS score of 7.8, published 12 May 2026.
Which products and versions are affected?
nebuly-ai optimate commit a6d302f912b481c94370811af6b11402f51d377f.
Is there a fix for CVE-2026-31219?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-31219 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-31219?
Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The _load_model() function in neural_magic_training.py is vulnerable to insecure deserialization (CWE-502) because it uses torch.load() without the weights_only=True parameter. When a user provides a path to a model file (such as .pt or .pth) via the --model command-line argument, the underlying Pickle module deserializes the file content. An attacker can craft a malicious model file containing arbitrary Python objects that execute code upon being unpickled. This vulnerability requires the victim to manually attempt to load the attacker's malicious model file.

Affected products

  • nebuly-ai optimate commit a6d302f912b481c94370811af6b11402f51d377f

Timeline

  • 2024-07-21: other: Vulnerable commit date
  • 2026-05-12: advisory: NVD publication date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.