CVE-2026-31217
Full vulnerability record from the local CVENow database.
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.
Severity
CRITICAL
CVSS score
9.8
(v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-05-12 16:16:13.600000
Last modified
2026-10-19 22:10:00.130000
View original CVE JSON
{
"id": "CVE-2026-31217",
"sourceIdentifier": "[email protected]",
"published": "2026-05-12T16:16:13.600",
"lastModified": "2026-10-19T22:10:00.130",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "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."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "n/a",
"product": "n/a",
"versions": [
{
"version": "n/a",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"baseScore": 9.8,
"baseSeverity": "CRITICAL",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 3.9,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-05-13T14:01:18.035202Z",
"id": "CVE-2026-31217",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-94"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:nebuly:optimate:2024-07-21:*:*:*:*:*:*:*",
"matchCriteriaId": "DED8DBE6-D034-4B06-AA5D-8D199E54AD87"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/nebuly-ai/optimate",
"source": "[email protected]",
"tags": [
"Product"
]
},
{
"url": "https://www.notion.so/CVE-2026-31217-35d1e13931888179ae40dea5258d2db9",
"source": "[email protected]",
"tags": [
"Mitigation",
"Third Party Advisory"
]
}
]
}