Vulnerabilities

Vulnerability · GHSA-78g4-xqwv-q3g8

Pillow: Bundled libopenjp2 2.5.4 in all wheels since 11.1.0 carries OSV-2025-219 heap-buffer-overflow write reachable from Image.open().load()

Published Oct 22, 2026 · catalog updated Oct 22, 2026 · Pillow: Bundled libopenjp2 2.5.4

Last checked Oct 23, 2026, 8 days ago.

Open the advisory

Exploitation likelihood is not on this record for GHSA-78g4-xqwv-q3g8. A missing EPSS score is not a low risk. Compare Pillow: Bundled libopenjp2 2.5.4 with the linked advisory before you change production.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (Pillow: Bundled libopenjp2 2.5.4).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
  • EPSS is missing. A missing score is not a low risk.
Severity
High8.1
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
Awaiting synchronization with FIRST
Remediation
Version ranges on file
Affected products
PyPI pillow · pip pillow

### Summary Every Pillow wheel from 11.1.0 onward bundles a libopenjp2 containing a heap-buffer-overflow **write** that is fixed upstream on master but has never appeared in an OpenJPEG release. See https://osv.dev/vulnerability/OSV-2025-219 Because the wheel bundles its own copy, a patched host OS does not help. It is reachable from with default settings. I am reporting it here rather than only upstream because Pillow is where the vulnerable binary actually reaches users. Note the inversion that makes this easy to miss: **OpenJPEG 2.5.2 and earlier are safe.** The bug was introduced in (2024-06-25), so keeping the dependency current is what creates the exposure. ### Details ## Affected wheels From ( ) at each tag: | Pillow | bundled OpenJPEG | status | |---|---|---| | 10.4.0 | 2.5.2 | safe | | 11.0.0 | 2.5.2 | safe | | **11.1.0, 11.2.1, 11.3.0** | **2.5.3** | **affected** | | **12.0.0 … 12.3.0** | **2.5.4** | **affected** | Confirmed on an installed wheel: → , bundled file . still pins as of 2026-10-06. ## The defect , in : is neither null-checked nor bounds-checked, and comes directly from the one-byte field of the SOT marker. The correct guard already exists a few lines later in (j2k.c:8459), writing the **same array at the same index** behind . One writer checked, its sibling not. Reached by giving the codestream a *valid* TLM marker — so is allocated once by , sized to the TLM entry count, and then skips all resizing — while setting in every SOT, which keeps the TLM "valid" and lets walk past the allocation. ## Patch status Fixed upstream in ("Fix heap buffer overlfow in opj_j2k_read_sod", 2026-02-10). The newest OpenJPEG tag is **v2.5.4 (2025-09-20)**, and reports *ahead 6, behind 0* — the fix is **in no release, 8 months on**. ## Suggested remediation 1. Carry as a patch in the wheel build until an OpenJPEG release includes it — three lines, identical to a guard already present in the same file. 2. Consider asking OpenJPEG to cut a release; they have had an u

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • PyPI pillow11.1.0 → 13.0.0
  • pip pillow>= 11.1.0, < 13.0.0

How to fix GHSA-78g4-xqwv-q3g8

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

Exploitation likelihood is not on this record for GHSA-78g4-xqwv-q3g8. A missing EPSS score is not a low risk. Compare Pillow: Bundled libopenjp2 2.5.4 with the linked advisory before you change production.

Which versions are affected?

Compare what you have installed with 11.1.0 → 13.0.0, >= 11.1.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-1395; CWE-787: Out-of-bounds Write. EPSS is not on this record yet. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Technology hubs

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 22, 2026 · GitHub Advisory Database

    Detected

    ### Summary Every Pillow wheel from 11.1.0 onward bundles a libopenjp2 containing a heap-buffer-overflow **write** that is fixed upstream on master but has never appeared in an OpenJPEG release. See https://osv.dev/vulnerability/OSV-2025-219 Because the wheel bundles its own copy, a patched host OS does not help. It is reachable from with default settings. I am reporting it here rather than only u

  2. Oct 22, 2026 · GitHub Advisory Database

    Updated

    ### Summary Every Pillow wheel from 11.1.0 onward bundles a libopenjp2 containing a heap-buffer-overflow **write** that is fixed upstream on master but has never appeared in an OpenJPEG release. See https://osv.dev/vulnerability/OSV-2025-219 Because the wheel bundles its own copy, a patched host OS does not help. It is reachable from with default settings. I am reporting it here rather than only u

  3. Oct 22, 2026 · GitHub Advisory Database

    Fix available

    pillow fixed in 13.0.0

  4. Oct 22, 2026 · GitHub Advisory Database

    Fix available

    pillow fixed in 13.0.0

  5. Oct 22, 2026 · GitHub Advisory Database

    Updated

    ### Summary Every Pillow wheel from 11.1.0 onward bundles a libopenjp2 containing a heap-buffer-overflow **write** that is fixed upstream on master but has never appeared in an OpenJPEG release. See https://osv.dev/vulnerability/OSV-2025-219 Because the wheel bundles its own copy, a patched host OS does not help. It is reachable from with default settings. I am reporting it here rather than only u

Sources

  • GitHub Advisory DatabasePackage advisoryGHSA-78g4-xqwv-q3g8

    Pillow: Bundled libopenjp2 2.5.4 in all wheels since 11.1.0 carries OSV-2025-219 heap-buffer-overflow write reachable from Image.open().load()

    github.com
  • OpenSSF OSV / OSV ScannerPackage advisoryGHSA-78g4-xqwv-q3g8

    Pillow: Bundled libopenjp2 2.5.4 in all wheels since 11.1.0 carries OSV-2025-219 heap-buffer-overflow write reachable from Image.open().load()

    osv.dev
  • PyPA Advisory DatabasePackage advisoryGHSA-78g4-xqwv-q3g8

    Pillow: Bundled libopenjp2 2.5.4 in all wheels since 11.1.0 carries OSV-2025-219 heap-buffer-overflow write reachable from Image.open().load()

    osv.dev

References

Freshness

Last verified in this catalog Oct 22, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • GitHub Advisory DatabaseOct 23, 2026
  • PyPA Advisory DatabaseOct 23, 2026
  • OpenSSF OSV / OSV ScannerOct 23, 2026