Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.3
CVE-2022-0845: PyTorch‑Lightning can let attackers run unwanted code
CVE-2022-0845 · published 4 years ago
Summary
Versions of PyTorch‑Lightning released before 1.6.0 let a malicious contributor add code that runs on anyone who downloads the package. This could let an attacker execute commands or steal data on a system that installs the library. Upgrade to version 1.6.0 or later, or replace the package with a safe version, to remove the risk.
What to do
- Update lightning to version 1.6.0.
- Update lightning ai et al. pytorch-lightning to version 1.6.0.
- Update lightningai pytorch_lightning to version 1.6.0 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| PyPI | – | lightning |
< 1.6.0 Fix: upgrade to 1.6.0
|
| pip | lightning ai et al. | pytorch-lightning |
< 1.6.0 Fix: upgrade to 1.6.0
|
| – | lightningai | pytorch_lightning |
< 1.6.0 cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:* |
Original advisory text
Code Injection in pytorchlightning/pytorch-lightning
Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.
References
- https://github.com/PyTorchLightning/pytorch-lightning/pull/12212
- https://github.com/advisories/GHSA-r5qj-cvf9-p85h Vendor Advisory
- https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSE...
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/0xxx/CVE-2022-0845.j... Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-0845 Vendor Advisory
- https://github.com/pytorchlightning/pytorch-lightning/commit/8b7a12c52e52a06408e... Patch Third Party Advisory
- https://huntr.dev/bounties/a795bf93-c91e-4c79-aae8-f7d8bda92e2a Exploit Issue Tracking Patch Third Party Advisory
Internet-facing
3 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically (estimated)
- Gives an attacker full control (estimated)
Type
CWE-94Code Injection
Timeline
Published5 Mar 2022
Updated12 Oct 2026
First seen6 Mar 2026
Track software like this
Free during beta