---
id: CVE-2026-96643
title: 'Pillow: PNG eXIf chunk makes EXIF parsing run in quadratic time'
summary: >-
  Pillow is a Python imaging library. From 11.0.0 until 13.0.0, Exif.load() in
  src/PIL/Image.py repeatedly slices the remaining EXIF data while it begins
  with the six-byte Exif header. src/PIL/PngImagePlugin.py accepts an uncapped
  PNG eXIf…
severity: high
cvss: 7.1
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'
cvssSource: cna
cwe:
  - CWE-407
  - CWE-606
vendor: python-pillow
product: Pillow
affected:
  - 'Pillow >= 11.0.0, < 13.0.0'
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-10-23T17:32:48.986807Z'
published: '2026-10-21'
updated: '2026-10-23'
sourceUpdated: '2026-10-23T21:19:12.901Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-96643'
references:
  - url: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-g4qv-2jxx-769h
    label: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-g4qv-2jxx-769h
  - url: 'https://github.com/python-pillow/Pillow/pull/10073'
    label: 'https://github.com/python-pillow/Pillow/pull/10073'
  - url: >-
      https://github.com/python-pillow/Pillow/commit/806e38381c781f32bbd22f4cd026678acd40fd6c
    label: >-
      https://github.com/python-pillow/Pillow/commit/806e38381c781f32bbd22f4cd026678acd40fd6c
  - url: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
    label: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-96643.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-96643'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2558566'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-96643'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-96643'
  - url: 'https://github.com/python-pillow/Pillow'
  - url: 'https://github.com/advisories/GHSA-g4qv-2jxx-769h'
tags:
  - cve.org
  - csaf
  - vex
  - red-hat
  - osv
  - pip
  - ghsa
epss: 0.00333
epssPercentile: 0.25364
aliases:
  - GHSA-g4qv-2jxx-769h
ecosystem: pip
patched:
  - pillow 13.0.0
scores:
  cna: 7.1
  vendor: 7.5
ingestedAt: '2026-10-21T21:13:32.750Z'
---

## Overview

Pillow is a Python imaging library. From 11.0.0 until 13.0.0, Exif.load() in src/PIL/Image.py repeatedly slices the remaining EXIF data while it begins with the six-byte Exif header. src/PIL/PngImagePlugin.py accepts an uncapped PNG eXIf chunk, so a file filled with repeated headers causes a new shrinking copy on every iteration and quadratic CPU work. The condition is reachable through Image.getexif(), Image._getexif(), and ImageOps.exif_transpose(), including common photo-upload rotation workflows. This issue is fixed in version 13.0.0.

## Affected

- `Pillow >= 11.0.0, < 13.0.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-96643)

Affected packages:

- `pillow >= 11.0.0, < 13.0.0`

Patched in:

- `pillow 13.0.0`

Source: https://osv.dev/vulnerability/GHSA-g4qv-2jxx-769h

## Vendor advisories

- **Red Hat VEX** · Important · affected: Exploit Intelligence, Lightspeed Core, OpenShift Lightspeed, Red Hat AI Inference Server, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux 8, … · no fix planned: Exploit Intelligence, Lightspeed Core, OpenShift Lightspeed, Red Hat AI Inference Server, … · updated 2026-10-23 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-96643.json)
