Views
No views yet
touch command. Do not load untrusted
NeuralForecast model directories on a machine you care about.neuralforecast (Nixtla) restores a saved model with NeuralForecast.load(path). During load it
calls raw pickle.load on alias_to_model.pkl, dataset.pkl, and configuration.pkl
(neuralforecast/core.py, lines 2481 / 2501 / 2514) with no safeguard — no allowlist, no
weights_only, no safe_mode, no warning. So loading an untrusted model directory executes
attacker-chosen code. alias_to_model.pkl is unpickled before any checkpoint is parsed, so the
payload fires immediately.model_dir/alias_to_model.pkl — the malicious artifact. Its __reduce__ runs os.system.model_dir/DummyModel_0.ckpt — empty file, only to pass the "at least one .ckpt" count guard.load_poc.py — builds the dir (or uses the bundled one) and triggers the sink via the public API.1pip install neuralforecast # 3.1.9
2python load_poc.py /tmp/PWNED # creates /tmp/PWNED via os.system during load
3ls -la /tmp/PWNED # file exists => arbitrary code executed[+] marker /tmp/PWNED exists = True
-rw-r--r-- 1 user group 0 ... /tmp/PWNEDneuralforecast/core.py, NeuralForecast.load:1with fsspec.open(f"{path}/alias_to_model.pkl", "rb") as f:
2 alias_to_model = pickle.load(f) # raw unpickle, no guard -> RCEalias_to_model/configuration/dataset in a non-executable format (JSON / typed),
or gate unpickling behind an explicit default-off trust_remote=True with a loud warning; pass
weights_only=True to the checkpoint loader where feasible.