Vulnerabilities

CVE-2026-59197

High 8.2 CVSS 3.1

Description

Pillow is a Python imaging library. Prior to 12.3.0, Pillow's public rank-filter API can trigger a native heap out-of-bounds write when given a very large odd filter size because ImageFilter.RankFilter.filter() calls image.expand(size // 2, size // 2) before rank-filter size validation and ImagingExpand() computes output dimensions with unchecked signed int arithmetic. This issue is fixed in version 12.3.0.

Description as published by the source, in English.

Key facts

Published
2026-07-14
Last modified
2026-10-24
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Scored by
security-advisories@github.com
Probability of exploitation
0.4 % higher than 36 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Yes, see references

Affected products

Vendor Product Versions Status
Python Pillow < 12.3.0 Affected

Weakness type

  • CWE-190: Integer Overflow or Wraparound

    The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is i…

  • CWE-787: Out-of-bounds Write

    The product writes data past the end, or before the beginning, of the intended buffer.

References

Related at Berigo

Articles

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities