CVE-2021-4118
Deserialization of Untrusted Data in pytorchlightning/pytorch-lightning
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.8
Deserialization of Untrusted Data in pytorchlightning/pytorch-lightning
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
- Record
CVE-2021-4118- 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 - Weakness
- CWE-502
- Updated
- 2026-11-02
EUVDEUVD-2021-0212
7.8
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
- Record
EUVD-2021-0212- 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 - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-2vj5-px25-gjrp
8.5
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
pytorch-lightning is vulnerable to Deserialization of Untrusted Data.
- Record
GHSA-2vj5-px25-gjrp- CVSS 4.0
- 8.5 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 - 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 - Weakness
- CWE-502
- Updated
- 2026-11-02
NVD
7.8
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
- Record
CVE-2021-4118- 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 - 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 - CVSS 2.0
- 6.8 Medium
AV:N/AC:M/Au:N/C:P/I:P/A:P - Weakness
- CWE-502
- Updated
- 2026-11-02
OSV
7.8
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
- Record
CVE-2021-4118- 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 - Updated
- 2026-11-02
OSVGHSA-2vj5-px25-gjrp
8.5
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
pytorch-lightning is vulnerable to Deserialization of Untrusted Data.
- Record
GHSA-2vj5-px25-gjrp- CVSS 4.0
- 8.5 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 - 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 - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVPYSEC-2021-874 No score
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
- Record
PYSEC-2021-874- Updated
- 2026-11-02
OSVPYSEC-2026-3968 No score
pytorch-lightning is vulnerable to Deserialization of Untrusted Data
- Record
PYSEC-2026-3968- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pytorch-lightningPyPI |
before 1.6.0 | 1.6.0 |
pytorch-lightningPyPI |
before 1.6.0, plus listed versions 0.0.20.10.00.20.2.20.2.3 Show 45 moreShow less0.2.40.2.4.10.2.50.2.5.10.2.5.20.2.60.30.3.10.3.20.3.30.3.40.3.4.10.3.50.3.60.3.6.10.3.6.30.3.6.40.3.6.50.3.6.60.3.6.70.3.6.80.3.6.90.4.00.4.10.4.20.4.30.4.40.4.50.4.60.4.70.4.80.4.90.5.00.5.10.5.1.20.5.1.30.5.20.5.2.10.5.30.5.3.10.5.3.20.5.3.30.6.00.7.10.7.3 |
1.6.0 |
pytorch-lightningPyPI |
before 1.6.0, plus listed versions 0.0.20.10.00.20.2.20.2.3 Show 45 moreShow less0.2.40.2.4.10.2.50.2.5.10.2.5.20.2.60.30.3.10.3.20.3.30.3.40.3.4.10.3.50.3.60.3.6.10.3.6.30.3.6.40.3.6.50.3.6.60.3.6.70.3.6.80.3.6.90.4.00.4.10.4.20.4.30.4.40.4.50.4.60.4.70.4.80.4.90.5.00.5.10.5.1.20.5.1.30.5.20.5.2.10.5.30.5.3.10.5.3.20.5.3.30.6.00.7.10.7.3 |
1.6.0 |
lightningPyPI |
before 1.6.0, plus listed versions 0.0.20.10.00.20.2.20.2.3 Show 45 moreShow less0.2.40.2.4.10.2.50.2.5.10.2.5.20.2.60.30.3.10.3.20.3.30.3.40.3.4.10.3.50.3.60.3.6.10.3.6.30.3.6.40.3.6.50.3.6.60.3.6.70.3.6.80.3.6.90.4.00.4.10.4.20.4.30.4.40.4.50.4.60.4.70.4.80.4.90.5.00.5.10.5.1.20.5.1.30.5.20.5.2.10.5.30.5.3.10.5.3.20.5.3.30.6.00.7.10.7.3 |
1.6.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-4118 is a high vulnerability (CVSS 7.8) in Pytorchlightning Pytorchlightning/pytorch-lightning, published December 23, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.02%, the 63rd percentile. Fixed in pytorch-lightning 1.6.0.
References
huntr.dev/bounties/31832f0c-e5bb-4552-a12c-542f81f111e6
github.com/pytorchlightning/pytorch-lightning/commit/62f1e82e032eb16565e676d39e0db0cac7e34ace
nvd.nist.gov/vuln/detail/CVE-2021-4118
github.com/PyTorchLightning/pytorch-lightning/issues/11045
github.com/PyTorchLightning/pytorch-lightning/pull/11099
github.com/PyTorchLightning/pytorch-lightning/releases/tag/1.6.0
github.com/advisories/GHSA-2vj5-px25-gjrp
github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2021-874.yaml
github.com/pytorchlightning/pytorch-lightning
Left out here: 254 versions. The JSON record has them.