# CVE-2021-4118: Deserialization of Untrusted Data in pytorchlightning/pytorch-lightning

- Severity: High 7.8 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.02%, higher than 64% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-12-23T17:15:11.000Z
- Modified: 2026-09-10T17:26:03.425Z
- Also known as: GHSA-2vj5-px25-gjrp, PYSEC-2021-874, PYSEC-2026-3968
- Weaknesses: CWE-502
- Assigned by: @huntrdev

## Description

pytorch-lightning is vulnerable to Deserialization of Untrusted Data

(As written by CVE List.)

## Affected

- pytorchlightning pytorchlightning/pytorch-lightning: from unspecified before 1.6
- pytorch-lightning (PyPI): before 1.6.0; before 62f1e82e032eb16565e676d39e0db0cac7e34ace
- lightningai pytorch_lightning: before 1.6.0
- lightning (PyPI): before 62f1e82e032eb16565e676d39e0db0cac7e34ace; before 1.6.0

## Every score

- @huntrdev: CVSS:3.0 7.8 High `CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://huntr.dev/bounties/31832f0c-e5bb-4552-a12c-542f81f111e6> (exploit, issue-tracking, patch, third-party-advisory, web)
- <https://github.com/pytorchlightning/pytorch-lightning/commit/62f1e82e032eb16565e676d39e0db0cac7e34ace> (fix, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-4118> (advisory)
- <https://github.com/PyTorchLightning/pytorch-lightning/issues/11045> (web)
- <https://github.com/PyTorchLightning/pytorch-lightning/pull/11099> (web)
- <https://github.com/PyTorchLightning/pytorch-lightning/releases/tag/1.6.0> (web)
- <https://github.com/advisories/GHSA-2vj5-px25-gjrp> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2021-874.yaml> (web)
- <https://github.com/pytorchlightning/pytorch-lightning> (package)

## Sources

- CVE List: [CVE-2021-4118](https://www.cve.org/CVERecord?id=CVE-2021-4118), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-2vj5-px25-gjrp](https://github.com/advisories/GHSA-2vj5-px25-gjrp), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2021-4118](https://nvd.nist.gov/vuln/detail/CVE-2021-4118), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-874](https://osv.dev/vulnerability/PYSEC-2021-874), CC-BY-4.0, modified 2026-09-10
- PyPA Advisory Database: [PYSEC-2026-3968](https://osv.dev/vulnerability/PYSEC-2026-3968), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2021-4118 · Whole record: https://cve.day/CVE-2021-4118.json · Rebuilt by cve.day 2026-11-25T22:58:06.148Z
