Executive brief
Nebuly AI Optimate is a collection of libraries used to optimize the performance of AI models. A security vulnerability in its training script allows the software to execute arbitrary, potentially malicious code when loading a model from a user-specified directory. An attacker could exploit this to take full control of the system running the optimization process, leading to data theft or unauthorized access to infrastructure.
Technical details
A code injection vulnerability exists in the _load_model() function within neural_magic_training.py of the Optimate project. The vulnerability is triggered when a user provides a directory path via the --model command-line argument. The script reads a file named module.py from the specified directory and executes its content using Python's exec() function without any validation or sanitization. An attacker who can influence the input directory path or place a malicious module.py file in a targeted directory can achieve arbitrary code execution in the context of the script's process. This issue was identified in commit a6d302f912b481c94370811af6b11402f51d377f.
Affected products
- Nebuly AI optimate commit a6d302f912b481c94370811af6b11402f51d377f
Timeline
- 2026-05-12: advisory: Initial disclosure of CVE-2026-31217