Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pytorch-lightning
  4. ›
  5. CVE-2022-0845

CVE-2022-0845: Code Injection in PyTorch Lightning

March 6, 2022 (updated October 25, 2024)

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 is included in the 1.6.0 release.

References

  • github.com/PyTorchLightning/pytorch-lightning/pull/12212
  • github.com/advisories/GHSA-r5qj-cvf9-p85h
  • github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2022-181.yaml
  • github.com/pytorchlightning/pytorch-lightning
  • github.com/pytorchlightning/pytorch-lightning/commit/8b7a12c52e52a06408e9231647839ddb4665e8ae
  • huntr.dev/bounties/a795bf93-c91e-4c79-aae8-f7d8bda92e2a
  • nvd.nist.gov/vuln/detail/CVE-2022-0845

Code Behaviors & Features

Detect and mitigate CVE-2022-0845 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.6.0

Fixed versions

  • 1.6.0

Solution

Upgrade to version 1.6.0 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/pytorch-lightning/CVE-2022-0845.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:59 +0000.