CVE-2025-23348
7.8NVIDIA · Megatron-LM
NVIDIA Megatron-LM contains a code injection vulnerability in the pretrain_gpt script, allowing local attackers to execute arbitrary code and escalate privileges via malicious input data.
Executive summary
A critical code injection vulnerability in NVIDIA Megatron-LM allows local authenticated attackers to achieve arbitrary code execution and full system compromise.
Vulnerability
This vulnerability stems from improper control of code generation (CWE-94) within the pretrain_gpt script. An attacker with local access and low privileges can supply malicious data to the script, resulting in code execution, privilege escalation, and potential data tampering.
Business impact
The potential for unauthorized code execution poses a severe risk to the integrity and confidentiality of the affected environment. With a CVSS score of 7.8, this flaw represents a high risk, as an attacker could gain elevated control over the host system, leading to unauthorized data disclosure or service disruption within the AI training pipeline.
Remediation
Immediate Action: Update NVIDIA Megatron-LM to version 0.13.1 or 0.12.3 immediately to incorporate the necessary security patches.
Proactive Monitoring: Monitor system logs for unexpected execution of shell commands or unauthorized modifications to training scripts or configuration files.
Compensating Controls: Restrict local access to the systems running Megatron-LM to only authorized personnel to prevent the exploitation of local privilege requirements.
Exploitation status
Public Exploit Available: No
Analyst recommendation
Given the potential for full system compromise and privilege escalation, organizations utilizing NVIDIA Megatron-LM should prioritize patching as part of their next maintenance cycle. System administrators must ensure that the update is applied to all instances to mitigate the risk of local code injection.