CVE-2026-31217
The loadmodel() function in the neuralmagictraining.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.
Package Versions Affected
Automatically patch vulnerabilities without upgrading
CVSS Version



Related Resources
References
https://www.notion.so/CVE-2026-31217-35d1e13931888179ae40dea5258d2db9, https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31217.json, https://nvd.nist.gov/vuln/detail/CVE-2026-31217, https://github.com/nebuly-ai/optimate