Skip to content

CVE-2025-23298 Getting Remote Code Execution in NVIDIA Merli...#1431

Merged
carlospolop merged 61 commits intomasterfrom
update_CVE-2025-23298__Getting_Remote_Code_Execution_in_N_20250924_182827
Oct 1, 2025
Merged

CVE-2025-23298 Getting Remote Code Execution in NVIDIA Merli...#1431
carlospolop merged 61 commits intomasterfrom
update_CVE-2025-23298__Getting_Remote_Code_Execution_in_N_20250924_182827

Conversation

@carlospolop
Copy link
Copy Markdown
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

Target: NVIDIA Merlin Transformers4Rec (Transformers-based recommender library for PyTorch). Integrates with Hugging Face Transformers, NVTabular, and Triton Inference Server.

CVE: CVE-2025-23298 — critical unsafe deserialization enabling remote code execution (often with elevated privileges) when loading model checkpoints.

Vulnerable component and code path: load_model_trainer_sta...

🔧 Technical Details

Abusing pickle reducers in ML checkpoints for RCE: Any ML framework path that calls torch.load() on untrusted checkpoints can be weaponized by embedding an object whose __reduce__ returns a callable (e.g., os.system) and arguments. Place the object under a key guaranteed to be deserialized (e.g., model_state_dict). When the framework resumes training or loads the model, the reducer executes and runs attacker-controlled code.

Supply-chain delivery via shared artifacts: Trojanize a checkpoint/model and distribute it through common channels (repos, cloud buckets, artifact registries). CI/CT/AutoML workflows that auto-resume or auto-deploy will deserialize the payload, granting code execution with the service’s privileges.

Defensive pattern for deserialization: Replace generic torch.load() with an allow-listed deserializer that validates object types and fields, prefer formats that don’t ex...

🤖 Agent Actions

I analyzed the repository and found an existing, highly relevant page for this content: src/AI/AI-Models-RCE.md. It already covers ML model deserialization RCEs (including PyTorch torch.load pickle behavior) and deep-links to the Keras model deserialization page. This is the best place to integrate the NVIDIA Merlin Transformers4Rec unsafe deserialization content.

What I updated:

  • Added a new table row for NVIDIA Merlin Transformers4Rec (CVE-2025-23298) summarizing the vulnerability and linking to the ZDI advisory.
  • Added a dedicated section “NVIDIA Merlin Transformers4Rec RCE via unsafe torch.load (CVE-2025-23298)” explaining:
    • The vulnerable function and file path (load_model_trainer_states_from_checkpoint in transformers4rec/torch/trainer/trainer.py).
    • Why torch.load/pickle reducers cause RCE, with a minimal malicious checkpoint code example placing a reducer under model_state_dict.
    • Attack surface (supply chain via shared artifacts; automated resume/deploy pipelines; often elevated context).
    • The patch details (commit b7eaea5, PR #802) introducing an allow-listed deserializer in transformers4rec/utils/serialization.py.
    • Defensive recommendations (use weights_only=True or allow-listed unpickler; prefer Safetensors/ONNX; provenance/signing; sandboxing; detection ideas).
    • Links to the vulnerable loader gist, PoC gist, and post-patch gist.
  • Extended the References section with:
    • The ZDI blog post URL you provided.
    • ZDI advisory link, NVIDIA commit link, and the gists.
    • Hugging Face Transformers project link for context.

No new files were created since the content fit naturally into the existing AI-Models-RCE page, which already addresses ML model checkpoint deserialization risks and references the Keras page for deeper gadget hunting content.

Changes implemented:

  • src/AI/AI-Models-RCE.md updated with the new section, table entry, and references.

This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

🗑️ File Cleanup

  • searchindex.js removed: This auto-generated file has been removed to prevent conflicts.

carlospolop and others added 30 commits August 29, 2025 11:56
…oading_20250824_182553

DLL ForwardSideLoading
… for Andr...

- Remove searchindex.js (auto-generated file)
- Remove searchindex.js (auto-generated file)
…ache Pois...

- Remove searchindex.js (auto-generated file)
- Remove searchindex.js (auto-generated file)
…al captur...

- Remove searchindex.js (auto-generated file)
…ilege Esc...

- Remove searchindex.js (auto-generated file)
…droid Sec...

- Remove searchindex.js (auto-generated file)
…unted__a_decade_old_RCE_in_the_AIO_20250828_123942

This House is Haunted a decade old RCE in the AION client
Replaced incorrect reference to 'HTLM' with the correct term 'NTLM'.
…vanced_SSL_Pinning_Detection_for_A_20250901_123952

SSLPinDetect Advanced SSL Pinning Detection for Android Secu...
…dows-hardening_windows-local-privilege-escalation_juicypotato_20250829_012533

Research Update Enhanced src/windows-hardening/windows-local...
…ope_Client_for_Windows___Local_Pri_20250830_184240

Advisory – Netskope Client for Windows – Local Privilege Esc...
…er_Fox__Cat___Mouse_in_Kernel_Shad_20250828_185321

Chasing the Silver Fox Cat & Mouse in Kernel Shadows
…_Actuator_HeapDump_to_SSH__credent_20250830_182823

HTB Eureka From Actuator HeapDump to SSH, credential capture...
…_password_spray_to_gMSA_dump__then_20250828_183418

HTB Sendai From password spray to gMSA dump, then ADCS ESC4 ...
…CTF_born_exploits_and_techniques_20250830_123618

The Art of PHP CTF‑born exploits and techniques
…_1_-_A_multistage_dropper_20250829_183210

GodFather - Part 1 - A multistage dropper
…ive-direc...

- Remove searchindex.js (auto-generated file)
…ht_in-app_JNI___so__behavior_logge_20250829_123609

SoTap Lightweight in-app JNI (.so) behavior logger for Andro...
carlospolop and others added 19 commits September 7, 2025 16:49
…Security__Understanding_the_Regist_20250905_011652

Demystifying 5G Security Understanding the Registration Prot...
…dows-hardening_active-directory-methodology_ad-certificates_domain-persistence_20250904_012126

Research Update Enhanced src/windows-hardening/active-direct...
…_Laravel_env_override__CVE_2024_52_20250907_012404

HTB Environment Laravel env override (CVE‑2024‑52301) → LFM ...
…le_Android_Bug_Bounty_Lab__Emulato_20250905_123731

Build a Repeatable Android Bug Bounty Lab Emulator vs Magisk...
…integrity_checks_to_locally_backdo_20250904_182820

Subverting code integrity checks to locally backdoor Signal,...
…Can__Sitecore_Experience_Platform__20250829_183502

Cache Me If You Can Sitecore Experience Platform Cache Poiso...
…ege_Escalation_in_Service_Finder_B_20250904_125030

Unpatched Privilege Escalation in Service Finder Bookings Pl...
…Improvements_and_Vulnerability_Dis_20250904_124648

ksmbd - Fuzzing Improvements and Vulnerability Discovery (2/...
…IDIA Merl...

- Remove searchindex.js (auto-generated file)
@carlospolop
Copy link
Copy Markdown
Collaborator Author

🔗 Additional Context

Original Blog Post: https://www.thezdi.com/blog/2025/9/23/cve-2025-23298-getting-remote-code-execution-in-nvidia-merlin

Content Categories: Based on the analysis, this content was categorized under "Generic Methodologies & Resources > Python > ML Model Deserialization RCE (PyTorch torch.load/pickle reducers) [extend/related to: Keras Model Deserialization Rce And Gadget Hunting]".

Repository Maintenance:

  • MD Files Formatting: 876 files processed

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

@github-actions github-actions Bot force-pushed the master branch 4 times, most recently from 55d15da to 919cd5c Compare September 29, 2025 21:20
@carlospolop
Copy link
Copy Markdown
Collaborator Author

merge

@github-actions github-actions Bot force-pushed the master branch 2 times, most recently from 88a07c5 to 73b307c Compare September 29, 2025 22:21
@carlospolop carlospolop merged commit 5cfdf51 into master Oct 1, 2025
@carlospolop carlospolop deleted the update_CVE-2025-23298__Getting_Remote_Code_Execution_in_N_20250924_182827 branch October 1, 2025 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants