{"id":7193,"date":"2025-09-25T10:03:33","date_gmt":"2025-09-25T10:03:33","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/09\/25\/nvidia-merlin-vulnerability-allow-attacker-to-achieve-remote-code-execution-with-root-privileges\/"},"modified":"2025-09-25T10:03:33","modified_gmt":"2025-09-25T10:03:33","slug":"nvidia-merlin-vulnerability-allow-attacker-to-achieve-remote-code-execution-with-root-privileges","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/09\/25\/nvidia-merlin-vulnerability-allow-attacker-to-achieve-remote-code-execution-with-root-privileges\/","title":{"rendered":"NVIDIA Merlin Vulnerability Allow Attacker to Achieve Remote Code Execution With Root Privileges"},"content":{"rendered":"<p>    NVIDIA Merlin Vulnerability Allow Attacker to Achieve Remote Code Execution With Root Privileges<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A critical vulnerability in <a href=\"https:\/\/cybersecuritynews.com\/nvidias-incomplete-patch-for-critical-flaw-lets-attackers-steal-ai-model-data\/\" target=\"_blank\" rel=\"noreferrer noopener\">NVIDIA\u2019s<\/a> Merlin Transformers4Rec library (CVE-2025-23298) enables unauthenticated attackers to achieve remote code execution (RCE) with root privileges via unsafe deserialization in the model checkpoint loader.\u00a0<\/p>\n<p>The discovery underscores the persistent security risks inherent in ML\/AI frameworks\u2019 reliance on Python\u2019s pickle serialization.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-nvidia-merlin-vulnerability\"><strong>NVIDIA Merlin Vulnerability<\/strong><\/h2>\n<p>Trend Micro\u2019s Zero Day Initiative (ZDI) stated that the vulnerability resides in the load_model_trainer_states_from_checkpoint function, which uses PyTorch\u2019s torch.load() without safety parameters. Under the hood, torch.load() leverages Python\u2019s pickle module, allowing arbitrary object <a href=\"https:\/\/cybersecuritynews.com\/apache-seatunnel-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener\">deserialization<\/a>.\u00a0<\/p>\n<p>Attackers can embed malicious code in a crafted checkpoint file\u2014triggering execution when untrusted pickle data is loaded. In the vulnerable implementation, cloudpickle loads the model class directly:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"681\" height=\"160\" src=\"https:\/\/i0.wp.com\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-154.png?resize=681%2C160&#038;ssl=1\" alt=\"NVIDIA Merlin Vulnerability\" class=\"wp-image-127952\" srcset=\"https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-154.png 681w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-154-300x70.png 300w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-154-150x35.png 150w\" sizes=\"(max-width: 681px) 100vw, 681px\"><\/figure>\n<\/div>\n<p>This approach grants attackers full control of the deserialization process. By defining a custom __reduce__ method, a malicious checkpoint can execute arbitrary system commands upon loading, e.g., calling os.system() to fetch and execute a remote script.<\/p>\n<p>The attack surface is vast: ML practitioners routinely share pre-trained checkpoints via public repositories or cloud storage. Production ML pipelines often run with <a href=\"https:\/\/cybersecuritynews.com\/nvidia-nemo-ai-curator-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener\">elevated privileges<\/a>, meaning a successful exploit not only compromises the model host but can also escalate to root-level access.<\/p>\n<p>To demonstrate the flaw, researchers crafted a malicious checkpoint:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"141\" src=\"https:\/\/i0.wp.com\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-155.png?resize=734%2C141&#038;ssl=1\" alt=\"NVIDIA Merlin Vulnerability\" class=\"wp-image-127953\" srcset=\"https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-155.png 734w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-155-300x58.png 300w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-155-696x134.png 696w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-155-150x29.png 150w\" sizes=\"(max-width: 734px) 100vw, 734px\"><\/figure>\n<\/div>\n<p>Loading this checkpoint via the vulnerable function triggers the embedded shell command prior to any model weight restoration\u2014resulting in immediate RCE under the context of the ML service.<\/p>\n<p>NVIDIA addressed the issue in PR #802 by replacing raw pickle calls with a custom load() function that whitelists approved classes.\u00a0<\/p>\n<p>The patched loader in serialization.py enforces input validation, and developers are encouraged to use weights_only=True in torch.load() to avoid untrusted object deserialization.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"668\" src=\"https:\/\/i0.wp.com\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156-1024x668.png?resize=1024%2C668&#038;ssl=1\" alt=\"Patch adding a custom load function\" class=\"wp-image-127954\" srcset=\"https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156-1024x668.png 1024w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156-300x196.png 300w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156-768x501.png 768w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156-644x420.png 644w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156-696x454.png 696w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156-1068x697.png 1068w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156-150x98.png 150w, https:\/\/cybersecuritynews.com\/wp-content\/uploads\/2025\/09\/image-156.png 1500w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><figcaption class=\"wp-element-caption\">Patch adding a custom load function<\/figcaption><\/figure>\n<\/div>\n<p>Developers must never use pickle on untrusted data and should restrict deserialization to known, safe classes.\u00a0<\/p>\n<p>Alternative formats\u2014such as Safetensors or ONNX\u2014offer safer model persistence. Organizations should enforce cryptographic signing of model files, sandbox deserialization processes, and include ML pipelines in regular security audits.\u00a0<\/p>\n<figure class=\"wp-block-table aligncenter\">\n<table class=\"has-fixed-layout\">\n<tbody>\n<tr>\n<td><strong>Risk Factors<\/strong><\/td>\n<td><strong>Details<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Affected Products<\/td>\n<td>NVIDIA Merlin Transformers4Rec \u2264 v1.5.0<\/td>\n<\/tr>\n<tr>\n<td>Impact<\/td>\n<td>Remote code execution as root<\/td>\n<\/tr>\n<tr>\n<td>Exploit Prerequisites<\/td>\n<td>Attacker-supplied model checkpoint loaded via torch.load()<\/td>\n<\/tr>\n<tr>\n<td>CVSS 3.1 Score<\/td>\n<td>9.8 (Critical)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>The broader community must advocate for security-first design principles and deprecate pickle-based mechanisms altogether.<\/p>\n<p>Until pickle reliance is eliminated, similar vulnerabilities will persist. Vigilance, robust input validation, and a zero-trust mindset remain crucial to safeguarding production ML systems against supply-chain and RCE threats.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 94%,rgb(169,184,195) 100%)\"><strong>Follow us on <a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google News<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">LinkedIn<\/a>, and <a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">X<\/a> for daily cybersecurity updates. <a href=\"https:\/\/cybersecuritynews.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Contact us<\/a> to feature your stories.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/nvidia-merlin-vulnerability\/\">NVIDIA Merlin Vulnerability Allow Attacker to Achieve Remote Code Execution With Root Privileges<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Florence Nightingale<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/nvidia-merlin-vulnerability\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NVIDIA Merlin Vulnerability Allow Attacker to Achieve Remote Code Execution With Root Privileges A critical vulnerability in NVIDIA\u2019s Merlin Transformers4Rec library (CVE-2025-23298) enables unauthenticated attackers to achieve remote code execution (RCE) with root privileges via unsafe deserialization in the model checkpoint loader.\u00a0 The discovery underscores the persistent security risks inherent in ML\/AI frameworks\u2019 reliance on [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,131,648],"tags":[130],"class_list":["post-7193","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-vulnerability","category-vulnerability-news","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/7193"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=7193"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/7193\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=7193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=7193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=7193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}