CVE-2025-55557
📋 TL;DR
A vulnerability in PyTorch v2.7.0 causes a Name Error when models containing torch.cummin operations are compiled with Inductor, leading to Denial of Service (DoS). This affects applications using PyTorch for machine learning inference or training with specific model architectures. The vulnerability is triggered during model compilation, not during normal execution.
💻 Affected Systems
- PyTorch
📦 What is this software?
Pytorch by Linuxfoundation
⚠️ Risk & Real-World Impact
Worst Case
Complete service disruption for PyTorch-based applications when processing specific model architectures, causing downtime for ML inference services or training pipelines.
Likely Case
Intermittent crashes or failures during model compilation phases, disrupting ML workflows and requiring manual intervention to restart processes.
If Mitigated
Minor service interruptions during development/testing phases with quick recovery through process restart or model modification.
🎯 Exploit Status
Exploitation requires ability to submit PyTorch models for compilation with Inductor. Public proof-of-concept exists in GitHub issues. Weaponization likely for targeted DoS attacks against ML services.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in PyTorch v2.7.1 and later
Vendor Advisory: https://github.com/pytorch/pytorch/issues/151738
Restart Required: Yes
Instructions:
1. Update PyTorch using pip: 'pip install --upgrade torch>=2.7.1' 2. Restart all PyTorch-dependent services 3. Recompile any affected models with updated version
🔧 Temporary Workarounds
Disable Inductor Compilation
allAvoid using Inductor compiler for model compilation to prevent triggering the vulnerability
Set environment variable: export TORCHINDUCTOR=0
Or modify code to avoid torch.compile() with inductor backend
Avoid torch.cummin Operations
allTemporarily replace torch.cummin with alternative operations in model architectures
Replace torch.cummin() with equivalent torch.cumsum() or manual implementations where possible
🧯 If You Can't Patch
- Implement circuit breakers and monitoring for model compilation failures to detect and alert on exploitation attempts
- Isolate model compilation services from production inference services to limit blast radius of potential DoS
🔍 How to Verify
Check if Vulnerable:
Check PyTorch version: 'python -c "import torch; print(torch.__version__)"' - if version is exactly 2.7.0 and you use torch.cummin with Inductor compilation, you are vulnerable.
Check Version:
python -c "import torch; print('PyTorch version:', torch.__version__)"
Verify Fix Applied:
After updating, test model compilation with torch.cummin using Inductor: 'torch.compile(model_with_cummin, backend="inductor")' should complete without Name Error.
📡 Detection & Monitoring
Log Indicators:
- NameError exceptions during torch.compile() operations
- Stack traces containing 'cummin' and 'inductor' in error logs
- Increased model compilation failure rates
Network Indicators:
- Sudden drops in ML inference service availability
- Increased failed API calls to model compilation endpoints
SIEM Query:
source="*pytorch*" AND ("NameError" OR "cummin" OR "inductor") AND severity>=ERROR