Impact
The _load_model() routine in the neural_magic_training.py script of the Optimate project accepts a directory path via the --model argument, reads a module.py file from that directory, and executes its contents using Python's exec() function without any validation or sanitization. This flaw, classified under CWE-94 – Unrestricted Code Execution, enables an attacker who controls the content of the specified directory to run arbitrary Python code within the process that executes the script, effectively granting full control over the environment executing the model training. The vulnerability allows an attacker to perform any action within the privileges of the running process, including data exfiltration, persistence, or further compromise of the host system.
Affected Systems
The vulnerability is present in the Optimate repository at commit a6d302f912b481c94370811af6b11402f51d377f dated 2024-07-21. No vendor or product list beyond this open‑source project is provided by the CNA data.
Risk and Exploitability
The EPSS score is below 1% and the issue is not listed in CISA's KEV catalog. With a CVSS score of 9.8, the weakness is high severity. It is essentially a local code‑execution vulnerability: an attacker must be able to influence the --model argument or the contents of the specified directory. The attack does not require network exposure or external services, and the impact scales with the privileges of the process running the script.
OpenCVE Enrichment