{"id":"CVE-2022-0845","aliases":["EUVD-2022-0222","GHSA-r5qj-cvf9-p85h","PYSEC-2022-181","PYSEC-2026-3969"],"status":"published","title":"Code Injection in pytorchlightning/pytorch-lightning","description":"Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.","severity":{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01008,"percentile":0.63284,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-94"],"published":"2022-03-05T21:25:09Z","modified":"2026-10-28T02:31:07Z","fixes":[{"ecosystem":"PyPI","package":"pytorch-lightning","fixed_in":["1.6.0"],"sources":["ghsa","osv"]},{"ecosystem":"PyPI","package":"lightning","fixed_in":["1.6.0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"pytorch-lightning","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"pytorch-lightning","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.0"}]}],"versions":["0.0.2","0.10.0","0.2","0.2.2","0.2.3","0.2.4","0.2.4.1","0.2.5","0.2.5.1","0.2.5.2","0.2.6","0.3","0.3.1","0.3.2","0.3.3","0.3.4","0.3.4.1","0.3.5","0.3.6","0.3.6.1","0.3.6.3","0.3.6.4","0.3.6.5","0.3.6.6","0.3.6.7","0.3.6.8","0.3.6.9","0.4.0","0.4.1","0.4.2","0.4.3","0.4.4","0.4.5","0.4.6","0.4.7","0.4.8","0.4.9","0.5.0","0.5.1","0.5.1.2","0.5.1.3","0.5.2","0.5.2.1","0.5.3","0.5.3.1","0.5.3.2","0.5.3.3","0.6.0","0.7.1","0.7.3","0.7.5","0.7.6","0.8.1","0.8.3","0.8.4","0.8.5","0.9.0","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8","1.2.0","1.2.0rc0","1.2.0rc1","1.2.0rc2","1.2.1","1.2.10","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.3.0","1.3.0rc1","1.3.0rc2","1.3.0rc3","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.7.post0","1.3.8","1.4.0","1.4.0rc0","1.4.0rc1","1.4.0rc2","1.4.1","1.4.2","1.4.3","1.4.4","1.4.5","1.4.6","1.4.7","1.4.8","1.4.9","1.5.0","1.5.0rc0","1.5.0rc1","1.5.1","1.5.10","1.5.10.post0","1.5.2","1.5.3","1.5.4","1.5.5","1.5.6","1.5.7","1.5.8","1.5.9","1.6.0rc0","1.6.0rc1"]},{"source":"osv","ecosystem":"PyPI","package":"pytorch-lightning","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"8b7a12c52e52a06408e9231647839ddb4665e8ae"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.0"}]}],"versions":["0.0.2","0.10.0","0.2","0.2.2","0.2.3","0.2.4","0.2.4.1","0.2.5","0.2.5.1","0.2.5.2","0.2.6","0.3","0.3.1","0.3.2","0.3.3","0.3.4","0.3.4.1","0.3.5","0.3.6","0.3.6.1","0.3.6.3","0.3.6.4","0.3.6.5","0.3.6.6","0.3.6.7","0.3.6.8","0.3.6.9","0.4.0","0.4.1","0.4.2","0.4.3","0.4.4","0.4.5","0.4.6","0.4.7","0.4.8","0.4.9","0.5.0","0.5.1","0.5.1.2","0.5.1.3","0.5.2","0.5.2.1","0.5.3","0.5.3.1","0.5.3.2","0.5.3.3","0.6.0","0.7.1","0.7.3","0.7.5","0.7.6","0.8.1","0.8.3","0.8.4","0.8.5","0.9.0","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8","1.2.0","1.2.0rc0","1.2.0rc1","1.2.0rc2","1.2.1","1.2.10","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.3.0","1.3.0rc1","1.3.0rc2","1.3.0rc3","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.7.post0","1.3.8","1.4.0","1.4.0rc0","1.4.0rc1","1.4.0rc2","1.4.1","1.4.2","1.4.3","1.4.4","1.4.5","1.4.6","1.4.7","1.4.8","1.4.9","1.5.0","1.5.0rc0","1.5.0rc1","1.5.1","1.5.10","1.5.2","1.5.3","1.5.4","1.5.5","1.5.6","1.5.7","1.5.8","1.5.9","1.6.0rc0","1.6.0rc1","1.5.10.post0"]},{"source":"osv","ecosystem":"PyPI","package":"lightning","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"8b7a12c52e52a06408e9231647839ddb4665e8ae"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.0"}]}],"versions":["0.0.2","0.10.0","0.2","0.2.2","0.2.3","0.2.4","0.2.4.1","0.2.5","0.2.5.1","0.2.5.2","0.2.6","0.3","0.3.1","0.3.2","0.3.3","0.3.4","0.3.4.1","0.3.5","0.3.6","0.3.6.1","0.3.6.3","0.3.6.4","0.3.6.5","0.3.6.6","0.3.6.7","0.3.6.8","0.3.6.9","0.4.0","0.4.1","0.4.2","0.4.3","0.4.4","0.4.5","0.4.6","0.4.7","0.4.8","0.4.9","0.5.0","0.5.1","0.5.1.2","0.5.1.3","0.5.2","0.5.2.1","0.5.3","0.5.3.1","0.5.3.2","0.5.3.3","0.6.0","0.7.1","0.7.3","0.7.5","0.7.6","0.8.1","0.8.3","0.8.4","0.8.5","0.9.0","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8","1.2.0","1.2.0rc0","1.2.0rc1","1.2.0rc2","1.2.1","1.2.10","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.3.0","1.3.0rc1","1.3.0rc2","1.3.0rc3","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.7.post0","1.3.8","1.4.0","1.4.0rc0","1.4.0rc1","1.4.0rc2","1.4.1","1.4.2","1.4.3","1.4.4","1.4.5","1.4.6","1.4.7","1.4.8","1.4.9","1.5.0","1.5.0rc0","1.5.0rc1","1.5.1","1.5.10","1.5.2","1.5.3","1.5.4","1.5.5","1.5.6","1.5.7","1.5.8","1.5.9","1.6.0rc0","1.6.0rc1","1.3.0rc0","1.1.0rc2","1.1.0rc1","0.8.2","0.8.0","0.7.4","0.7.2","0.7.0","0.2.1","0.1.2","0.1.1","0.0.1"]}],"products":[{"vendor":"lightningai","product":"pytorch_lightning"},{"vendor":"pytorchlightning","product":"pytorchlightning/pytorch-lightning"}],"references":[{"url":"https://huntr.dev/bounties/a795bf93-c91e-4c79-aae8-f7d8bda92e2a","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","web"]},{"url":"https://github.com/pytorchlightning/pytorch-lightning/commit/8b7a12c52e52a06408e9231647839ddb4665e8ae","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0845","tags":["advisory"]},{"url":"https://github.com/PyTorchLightning/pytorch-lightning/pull/12212","tags":["web"]},{"url":"https://github.com/advisories/GHSA-r5qj-cvf9-p85h","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2022-181.yaml","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/0xxx/CVE-2022-0845.json","tags":["advisory"]},{"url":"https://github.com/pytorchlightning/pytorch-lightning","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2022-0845","title":"Code Injection in pytorchlightning/pytorch-lightning","description":"Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.","status":"published","published":"2022-03-05T21:25:09Z","modified":"2024-08-02T23:40:04.57Z","cvss":[{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:34:41.69911Z"}],"euvd":[{"id":"EUVD-2022-0222","description":"Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.","status":"published","published":"2022-03-05T21:25:09Z","modified":"2024-08-02T23:40:04Z","cvss":[{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high"}],"updated_at":"2026-11-03T03:26:03.912978Z"}],"ghsa":[{"id":"GHSA-r5qj-cvf9-p85h","title":"Code Injection in PyTorch Lightning","description":"PyTorch Lightning version 1.5.10 and prior is vulnerable to code injection. An attacker could execute commands on the target OS running the operating system by setting the `PL_TRAINER_GPUS` when using the `Trainer` module. A [patch](https://github.com/pytorchlightning/pytorch-lightning/commit/8b7a12c52e52a06408e9231647839ddb4665e8ae) is included in the `1.6.0` release.","status":"published","published":"2022-03-06T00:00:16Z","modified":"2024-10-25T20:49:59Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:38:13.09489Z"}],"nvd":[{"id":"CVE-2022-0845","description":"Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.","status":"published","published":"2022-03-05T22:15:07.843Z","modified":"2026-06-17T04:21:21.547Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high","assessor":"secondary"},{"version":"2.0","score":10,"vector":"AV:N/AC:L/Au:N/C:C/I:C/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:07:12.711288Z"}],"osv":[{"id":"CVE-2022-0845","title":"Code Injection in pytorchlightning/pytorch-lightning","description":"Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.","status":"published","published":"2022-03-05T21:25:09Z","modified":"2026-10-28T02:31:07.756088246Z","cvss":[{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:44:22.824781Z"},{"id":"GHSA-r5qj-cvf9-p85h","title":"Code Injection in PyTorch Lightning","description":"PyTorch Lightning version 1.5.10 and prior is vulnerable to code injection. An attacker could execute commands on the target OS running the operating system by setting the `PL_TRAINER_GPUS` when using the `Trainer` module. A [patch](https://github.com/pytorchlightning/pytorch-lightning/commit/8b7a12c52e52a06408e9231647839ddb4665e8ae) is included in the `1.6.0` release.","status":"published","published":"2022-03-06T00:00:16Z","modified":"2026-09-10T17:26:06.10548776Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:46:55.480549Z"},{"id":"PYSEC-2022-181","description":"Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.","status":"published","published":"2022-03-05T22:15:00Z","modified":"2026-09-10T17:26:06.10548776Z","updated_at":"2026-11-02T15:52:53.449407Z"},{"id":"PYSEC-2026-3969","description":"Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.","status":"published","published":"2026-09-10T16:42:38.429529Z","modified":"2026-09-10T17:26:06.10548776Z","updated_at":"2026-11-02T15:52:57.255153Z"}]}}
