Downloads · 30 days
8
24% of all-time downloads
tonydav41/nemo-poc-torch-load-rce-2026-05-12
nemo-poc-torch-load-rce-2026-05-12 is a machine learning model from tonydav41. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for nemo.
nemo-toolkit==2.5.0 (latest PyPI wheel as of 2026-05-12) loads .nemo archive weights via Python's standard deserializer with weightsonly=False. Any attacker who hands a crafted .nemo file to Model.restorefrom(path) (t…
Downloads · 30 days
8
24% of all-time downloads
All-time downloads
33
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.nemo10.2 KB · 56%
From the Hugging Face model README
nemo-toolkit==2.5.0 (latest PyPI wheel as of 2026-05-12) loads .nemo archive weights via Python's standard deserializer with weights_only=False. Any attacker who hands a crafted .nemo file to Model.restore_from(path) (the canonical public API for loading NeMo models) achieves arbitrary code execution at load time, before any model instantiation.
malicious.nemo - 10,240-byte malicious archivebuild_poc.py - builds the malicious archivetrigger.py - calls SaveRestoreConnector._load_state_dict_from_disk directlyrestore_from_trigger.py - calls Model.restore_from() (the documented public API)repro.sh - one-command reproducerbash repro.sh
Expected: /tmp/NEMO_AUDIT.txt is created with the line EXPLOIT CONFIRMED: PWNED by nemo .nemo load via torch.load(weights_only=False). repro.sh exits 0 on success.
nemo-toolkit==2.5.0 (latest PyPI release as of 2026-05-12).
Distinguisher: the main branch already fixed this at commit 59854cbc9 (post-v2.5.0rc0 tag) by switching to weights_only=True. The released PyPI wheel is unfixed. Verify via:
git show v2.5.0rc0:nemo/core/connectors/save_restore_connector.py | grep weights_only
# weights_only=False
nemo/core/connectors/save_restore_connector.py:756-758 in the shipped wheel:
def _load_state_dict_from_disk(model_weights, map_location=None):
return torch.load(model_weights, map_location='cpu', weights_only=False)
Reach (call chain): Model.restore_from(...) → SaveRestoreConnector.load_config_and_state_dict() → _load_state_dict_from_disk() → sink. Also SaveRestoreConnector.extract_state_dict_from() → sink. Both are documented public APIs in the NeMo user guide.
CVSS 3.1 8.8 HIGH (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H). User must call the load API on attacker-supplied bytes (UI:R), which is the documented intended workflow for sharing NeMo models. ML-multiplier eligible: NeMo models ARE the artifact, and restore_from is the canonical entry point.
Tony Davis (lendtrain on huntr) - 2026-05-12.