Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Pillow
  4. ›
  5. CVE-2026-59205

CVE-2026-59205: Pillow: Controlled heap out-of-bounds write in Pillow `ImageCmsTransform.apply()` via output mode mismatch

July 20, 2026

Pillow’s public ImageCms.ImageCmsTransform.apply(im, imOut) API can trigger controlled native heap corruption when the caller supplies an output image whose mode does not match the transform’s declared output mode.

For example, a transform built as RGBA -> RGBA can be applied to an L output image. Pillow checks dimensions only, then calls LittleCMS with the output row pointer. LittleCMS writes RGBA-sized rows into a 1-byte-per-pixel L image row.

References

  • github.com/advisories/GHSA-9hw9-ch79-4vh6
  • github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-3453.yaml
  • github.com/python-pillow/Pillow/commit/a9ffc42bedf4fc0a7ef8d6486e7f9e81e3397721
  • github.com/python-pillow/Pillow/pull/9715
  • github.com/python-pillow/Pillow/releases/tag/12.3.0
  • github.com/python-pillow/Pillow/security/advisories/GHSA-9hw9-ch79-4vh6
  • nvd.nist.gov/vuln/detail/CVE-2026-59205

Code Behaviors & Features

Detect and mitigate CVE-2026-59205 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 12.3.0

Fixed versions

  • 12.3.0

Solution

Upgrade to version 12.3.0 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-787: Out-of-bounds Write

Source file

pypi/Pillow/CVE-2026-59205.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 08 Aug 2026 00:17:33 +0000.