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

CVE-2026-31218 · Severity: info · CVSS 0 · Published 2026-05-12

Nebuly AI Optimate is a collection of libraries used to optimize the performance of AI models. A security vulnerability exists in how the software handles model files, allowing a malicious actor to execute unauthorized commands on a user's system. This occurs when the software processes a specially crafted model file, potentially leading to a full system compromise or data theft.

Technologies: Nebuly AI Optimate. Vendors: Nebuly AI.

Quick answers

Is CVE-2026-31218 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-31218 being exploited in the wild.
How severe is CVE-2026-31218?
Informational severity, with a CVSS score of 0, published 12 May 2026.
Which products and versions are affected?
Nebuly AI Optimate commit a6d302f912b481c94370811af6b11402f51d377f.
Is there a fix for CVE-2026-31218?
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-31218 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-31218?
Check whether you run Nebuly AI Optimate at an affected version. 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 within the Optimate project (specifically commit a6d302f) is vulnerable to insecure deserialization (CWE-502). The vulnerability exists because the code calls torch.load() on a state_dict.pt file without setting the weights_only=True parameter. Since torch.load() uses the Python pickle module by default, it can be coerced into deserializing arbitrary Python objects. An attacker can exploit this by providing a maliciously crafted state_dict.pt file via the --model argument, resulting in arbitrary code execution with the privileges of the user running the script.

Affected products

  • Nebuly AI optimate commit a6d302f912b481c94370811af6b11402f51d377f

Timeline

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

References

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