CVE-2025-23298 Overview
CVE-2025-23298 affects NVIDIA Merlin Transformers4Rec, a library for sequential and session-based recommendation tasks. The vulnerability resides in a Python dependency used by the framework and enables code injection [CWE-94]. An attacker with local, low-privileged access can trigger arbitrary code execution when the affected component processes untrusted input. Successful exploitation may lead to code execution, privilege escalation, information disclosure, and data tampering across the confidentiality, integrity, and availability triad.
Critical Impact
A local attacker with limited privileges can execute arbitrary code, escalate privileges, and tamper with recommendation model data or training pipelines on affected NVIDIA Merlin Transformers4Rec deployments.
Affected Products
- NVIDIA Merlin Transformers4Rec (all platforms)
- Deployments using the vulnerable Python dependency
- Machine learning pipelines and training environments running Transformers4Rec
Discovery Timeline
- 2025-08-13 - CVE-2025-23298 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-23298
Vulnerability Analysis
The vulnerability is classified as Improper Control of Generation of Code [CWE-94], commonly known as code injection. NVIDIA Merlin Transformers4Rec inherits the flaw through a Python dependency that fails to safely handle attacker-controlled input during deserialization or dynamic code evaluation. An attacker capable of supplying crafted objects, serialized artifacts, or model files to the Transformers4Rec runtime can influence code paths that execute injected Python instructions.
Exploitation requires local access with low privileges and no user interaction. The scope remains unchanged, but the impact on confidentiality, integrity, and availability is high because the injected code executes with the privileges of the machine learning workload. In shared training environments, this often equates to service account or notebook-user permissions with access to datasets and model registries.
Root Cause
The root cause is unsafe handling of untrusted data by a Python dependency bundled with Transformers4Rec. Functions that dynamically load, deserialize, or evaluate objects transform attacker-controlled content into executable code without sufficient validation. This pattern is common in ML tooling that relies on pickle, dynamic imports, or configuration files interpreted as Python.
Attack Vector
The attack vector is local. An attacker must place a malicious artifact (such as a serialized model, cached asset, or configuration file) where a Transformers4Rec process will load it, or must coerce a legitimate user to load such an artifact. Upon load, the injected payload executes in the context of the user or service account running the ML pipeline, enabling downstream privilege escalation, exfiltration of training data, or tampering with model outputs. See the NVIDIA Support Response and the NVD CVE-2025-23298 Details for vendor-specific guidance.
Detection Methods for CVE-2025-23298
Indicators of Compromise
- Unexpected Python child processes spawned from Transformers4Rec workers or Jupyter kernels loading model artifacts.
- Outbound network connections from ML training hosts to unfamiliar destinations shortly after model or dataset load events.
- Modifications to Python environment files, site-packages, or model registry entries that do not correlate with authorized deployments.
- New or altered files in cache directories used by Transformers4Rec that contain executable Python or serialized objects from untrusted sources.
Detection Strategies
- Monitor process lineage on ML hosts for shells, interpreters, or network utilities spawned by Python processes executing Transformers4Rec code.
- Inspect artifacts loaded by pickle, torch.load, or equivalent deserialization APIs for unauthorized sources or checksum mismatches.
- Correlate file writes in model and cache directories with the identity of the loading process and the origin of the artifact.
Monitoring Recommendations
- Enable audit logging for Python interpreter invocations and dependency imports within ML training and inference containers.
- Alert on anomalous privilege changes or credential access originating from ML service accounts.
- Track changes to requirements.txt, pyproject.toml, and installed dependency versions across Transformers4Rec environments.
How to Mitigate CVE-2025-23298
Immediate Actions Required
- Review the NVIDIA Support Response and apply the recommended dependency updates for Merlin Transformers4Rec.
- Restrict local access to hosts running Transformers4Rec to trusted operators and service accounts only.
- Treat all model files, serialized objects, and configuration inputs from external or shared sources as untrusted until validated.
Patch Information
Refer to the NVIDIA Support Response for the vendor's remediation guidance, including the fixed dependency versions required for Merlin Transformers4Rec. Update the Python dependency identified by NVIDIA in all training, inference, and development environments, and rebuild container images that embed the vulnerable component.
Workarounds
- Load only signed or hash-verified model artifacts from trusted internal registries.
- Disable automatic execution of user-supplied configuration files within Transformers4Rec pipelines where feasible.
- Run Transformers4Rec workloads under least-privilege service accounts with read-only access to sensitive datasets.
- Isolate ML training environments using containers or dedicated hosts to limit blast radius from injected code.
# Configuration example: update the vulnerable dependency in an isolated environment
python -m pip install --upgrade transformers4rec
pip check
# Verify artifact integrity before loading models
sha256sum /models/transformers4rec/*.pkl
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

