Executive brief
PyTorch Lightning, a machine learning framework built on PyTorch, uses unsafe eval() function to parse configuration data in versions prior to 1.6.0. An attacker who can control configuration inputs could execute arbitrary code during model training or deployment, potentially compromising the entire ML pipeline and accessing sensitive data.
Technical details
The vulnerability exists in argument parsing logic that uses Python's eval() function instead of safe alternatives like ast.literal_eval(). This allows remote code execution when untrusted configuration data is processed. The fix (commit 8b7a12c) replaces eval() with ast.literal_eval() to restrict parsing to literal Python structures only.
Affected products
- PyTorch Lightning Lightning 0.0.1 through 1.5.10
Timeline
- 2026-09-10: disclosed
- 2022: patched: Fixed in version 1.6.0