fairseq-rce-poc / README.md
Rammadaeus's picture
Upload README.md with huggingface_hub
071a5cf verified

fairseq Multi-Vector RCE — Proof of Concept

Demonstrates arbitrary code execution in fairseq 0.12.2 via:

  1. Pickle RCE — torch.load(weights_only=False) in checkpoint_utils.py:340
  2. eval() injection — eval_str_list() in utils.py:791 (15+ call sites)
  3. Shell injection — post_save_script → subprocess.call() in audio_pretraining.py:253

Reproduction

git clone https://github.com/facebookresearch/fairseq
cd fairseq
pip install -e .
python exploit.py
cat /tmp/fairseq_rce_proof.json

Files

  • exploit.py — Full PoC demonstrating all 3 vectors with proof output
  • create_poisoned_checkpoint.py — Standalone poisoned .pt generator

Impact

228 vulnerable call sites across the fairseq codebase. Every model checkpoint load is an RCE vector.