CVE-2026-31217 Code injection in n/a
Attackers can execute arbitrary Python code by supplying a malicious module.py file via the --model argument in the optimate project.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-31217?
CVE-2026-31217 is a critical code injection vulnerability in n/a, published on 12 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The _load_model() function in the neural_magic_training.py script of the optimate project in commit a6d302f912b481c94370811af6b11402f51d377f (2024-07-21) allows arbitrary code execution. When a user supplies a directory path via the --model command-line argument, the function reads a module.py file from that directory and executes its contents directly using Python's exec() function. This design does not validate or sanitize the file's content, allowing an attacker who controls the input directory to execute arbitrary Python code in the context of the process running the script.
Weakness: CWE-94
Which versions are affected by CVE-2026-31217?
It affects 1 product.
Products include Nebuly Optimate.
How do I fix CVE-2026-31217?
No fix has been published for CVE-2026-31217 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-31217 being exploited?
There is no known exploitation of CVE-2026-31217 in the wild and no public exploit code.
Sources
Also known as GHSA-3jxq-4q7m-7pfc.