CVE-2026-31217
JSON

9.8critical

The loadmodel() function in the neuralmagictraining.py script of the optimate project in commit a6d302f912b481c94370811af6b11402f51d377f (2…

Severity
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
0.43% (higher than 38% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
nebuly optimate2024-07-21NVD

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

NVD (es)

La función _load_model() en el script neural_magic_training.py del proyecto optimate en el commit a6d302f912b481c94370811af6b11402f51d377f (2024-07-21) permite la ejecución de código arbitrario. Cuando un usuario proporciona una ruta de directorio a través del argumento de línea de comandos --model, la función lee un archivo module.py de ese directorio y ejecuta su contenido directamente utilizando la función exec() de Python. Este diseño no valida ni sanitiza el contenido del archivo, permitiendo a un atacante que controla el directorio de entrada ejecutar código Python arbitrario en el contexto del proceso que ejecuta el script.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-31217 changed 2026-05-13CVE Terms of Use
NVDCVE-2026-31217 changed 2026-10-19Public domain