Cyber Security News

NVIDIA Merlin Flaw Enables Remote Code Execution with Root Access

A critical vulnerability in NVIDIA’s Merlin Transformers4Rec library allows attackers to achieve remote code execution with root privileges.

Discovered by the Trend Micro Zero Day Initiative (ZDI) Threat Hunting Team, the flaw stems from unsafe deserialization in the model checkpoint loading functionality.

Tracked as CVE-2025-23298, this vulnerability underscores the persistent security challenges in machine learning frameworks that rely on Python’s pickle serialization.

Discovery of Unsafe Deserialization

While auditing ML/AI frameworks for supply chain risks, ZDI researchers focused on how models are persisted and loaded.

In Transformers4Rec’s load_model_trainer_states_from_checkpoint function, PyTorch’s torch.load() is used without sandboxing or class restrictions.

CVEAffected ProductImpactCVSS 3.1 Score
CVE-2025-23298NVIDIA Merlin Transformers4RecRemote Code Execution as root9.8

Because torch.load() uses Python’s pickle protocol, it can execute arbitrary code during deserialization.

ZDI confirmed that loading a crafted checkpoint file could trigger root-level commands immediately when restoring model state.

To demonstrate the risk, the research team built a malicious checkpoint object whose reduce method invokes system commands.

When torch.save() writes the malicious object into a checkpoint and torch.load() later reads it, the attacker’s payload runs before any model weights are processed.

In production environments where ML services often run with elevated privileges this leads to full system compromise.

The exploit can exfiltrate data, install backdoors, and pivot to other systems within the network.

NVIDIA patched the vulnerability in Transformers4Rec commit b7eaea5 (PR #802), replacing direct pickle calls with a custom loader that restricts deserialization to approved classes.

The new implementation uses a secure load() function in serialization.py to validate object types before restoration.

The patch adding a custom load function in transformers4rec/torch/trainer.trainer.load_model_trainer_states_from_checkpoint

To prevent similar issues, developers should avoid untrusted pickle data, use PyTorch’s weights_only=True option, and adopt safer formats such as safetensors or ONNX.

Organizations must enforce model provenance checks, sign checkpoints cryptographically, and sandbox model loading.

This vulnerability highlights the urgent need for secure serialization standards in ML/AI ecosystems and demonstrates that pickle-based workflows remain a critical attack vector despite long-standing community warnings.

Follow us on Google News, LinkedIn, and X to Get Instant Updates and Set GBH as a Preferred Source in Google.

Divya

Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Recent Posts

Hackers Use ConnectWise SkyKick Credentials to Access Microsoft 365, Halting Cloud Backups

Attackers abused compromised ConnectWise Cloud Backup credentials to access Microsoft 365 customer environments, prompting ConnectWise…

1 day ago

Anthropic’s Claude AI Uncovers Origins of NSA-Provided Cryptographic Keys After 25 Years

Anthropic says an internal Claude research model reconstructed how the National Security Agency generated seeds…

1 day ago

Critical WordPress Flaws Allow Attackers to Execute Remote Code Without Authentication

Two WordPress Core vulnerabilities can be chained to execute remote code without authentication, according to…

1 day ago

OpenBSD Kernel Flaw Dating Back 37 Years Enables Local Privilege Escalation to Root

A newly disclosed OpenBSD kernel exploitation chain combines a shared memory accounting flaw with a…

1 day ago

GhostAction Hackers Hide Credential-Stealing Malware in Fake Font Files Across 94 GitHub Repositories

GhostAction attackers have expanded their GitHub credential theft campaign with a second stage that disguises…

1 day ago

SideCopy Hackers Target Indian Organizations With ReverseRAT Malware to Steal Data

Indian authorities have warned that SideCopy hackers are targeting Indian organizations, including academic institutions, with…

1 day ago