CVE-2026-31217

Published May 12, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Nebuly
Nebuly optimate
CPEs cpe:2.3:a:nebuly:optimate:2024-07-21:*:*:*:*:*:*:*
Vendors & Products Nebuly
Nebuly optimate
Type Values Removed Values Added
First Time appeared Nebuly-ai
Nebuly-ai optimate
Vendors & Products Nebuly-ai
Nebuly-ai optimate
Type Values Removed Values Added
Title Arbitrary Code Execution via Unvalidated Exec in Optimate's load_model Function
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Arbitrary Code Execution via Unvalidated Exec in Optimate's load_model Function
Weaknesses CWE-94
Type Values Removed Values Added
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.
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
May 13, 2026, 2:01 PM
Reserved
Mar 9, 2026, 12:00 AM
Status
Analyzed
Published
May 12, 2026, 4:16 PM
Modified
Oct 19, 2026, 10:10 PM