{"id":"CVE-2026-28231","summary":"pillow_heif Has Integer Overflow in Encode Path Buffer Validation that Leads to Heap Out-of-Bounds Read","details":"pillow_heif is a Python library for working with HEIF images and plugin for Pillow. Prior to version 1.3.0, an integer overflow in the encode path buffer validation of `_pillow_heif.c` allows an attacker to bypass bounds checks by providing large image dimensions, resulting in a heap out-of-bounds read. This can lead to information disclosure (server heap memory leaking into encoded images) or denial of service (process crash). No special configuration is required — this triggers under default settings. Version 1.3.0 fixes the issue.","aliases":["GHSA-5gjj-6r7v-ph3x","PYSEC-2026-2248","PYSEC-2026-2258"],"modified":"2026-08-12T15:32:10.161907Z","published":"2026-02-27T20:13:45.195Z","related":["openSUSE-SU-2026:10285-1"],"database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-125","CWE-190"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28231.json"},"references":[{"type":"WEB","url":"https://github.com/bigcat88/pillow_heif/releases/tag/v1.3.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28231.json"},{"type":"ADVISORY","url":"https://github.com/bigcat88/pillow_heif/security/advisories/GHSA-5gjj-6r7v-ph3x"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28231"},{"type":"FIX","url":"https://github.com/bigcat88/pillow_heif/commit/8305a15d3780c533b762578cbe987d27a2c59c7a"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/bigcat88/pillow_heif","events":[{"introduced":"0"},{"fixed":"6bffca6bada2e071418a9092e7958bcecf4652c1"},{"fixed":"8305a15d3780c533b762578cbe987d27a2c59c7a"}],"database_specific":{"cpe":"cpe:2.3:a:bigcat88:pillow-heif:*:*:*:*:*:python:*:*","extracted_events":[{"introduced":"0"},{"fixed":"1.3.0"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v1.2.1","v1.2.0","v1.1.1","v1.1.0","v1.0.0","v0.22.0","v0.21.0","v0.20.0","v0.18.0","v0.17.0","v0.16.0","v0.15.0","v0.14.0","v0.13.1","v0.13.0","v0.12.0","v0.11.1","v0.11.0","v0.10.1","v0.10.0","v0.9.3","v0.9.2","v0.9.1","v0.9.0","v0.8.0","v0.7.2","v0.7.1","v0.7.0","v0.6.1","v0.6.0","v0.5.1","v0.5.0","v0.4.0","v0.3.2","v0.3.1","v0.3.0","v0.2.5","v0.2.4","v0.2.3","v0.2.2","v0.2.1","v0.2.0","v0.1.11","v0.1.10","v0.1.9","v0.1.8","v0.1.7","v0.1.6","v0.1.5","v0.1.4","v0.1.3","v0.1.2","v0.1.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-28231.json","vanir_signatures_modified":"2026-08-12T15:32:10Z","vanir_signatures":[{"signature_type":"Function","signature_version":"v1","source":"https://github.com/bigcat88/pillow_heif/commit/8305a15d3780c533b762578cbe987d27a2c59c7a","target":{"function":"_CtxWriteImage_add_plane_l","file":"pillow_heif/_pillow_heif.c"},"deprecated":false,"digest":{"length":1653,"function_hash":"229049611692815523836991351280953004002"},"id":"CVE-2026-28231-7e61bac2"},{"source":"https://github.com/bigcat88/pillow_heif/commit/8305a15d3780c533b762578cbe987d27a2c59c7a","target":{"file":"pillow_heif/_pillow_heif.c"},"deprecated":false,"digest":{"line_hashes":["246079929936737268733229901171032701314","110371096488593823279586643170395125212","234987017400952139396110290102137327023","15033829013945911038025639667639462153","246079929936737268733229901171032701314","110371096488593823279586643170395125212","234987017400952139396110290102137327023","15033829013945911038025639667639462153","246079929936737268733229901171032701314","110371096488593823279586643170395125212","234987017400952139396110290102137327023","15033829013945911038025639667639462153"],"threshold":0.9},"id":"CVE-2026-28231-88d3275d","signature_type":"Line","signature_version":"v1"},{"source":"https://github.com/bigcat88/pillow_heif/commit/8305a15d3780c533b762578cbe987d27a2c59c7a","target":{"file":"pillow_heif/_pillow_heif.c","function":"_CtxWriteImage_add_plane_la"},"deprecated":false,"digest":{"function_hash":"291382291529431139650997524064320700110","length":2457},"id":"CVE-2026-28231-922777ee","signature_type":"Function","signature_version":"v1"},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/bigcat88/pillow_heif/commit/8305a15d3780c533b762578cbe987d27a2c59c7a","target":{"file":"pillow_heif/_pillow_heif.c","function":"_CtxWriteImage_add_plane"},"deprecated":false,"digest":{"length":5640,"function_hash":"4004059895367826926163106730994271899"},"id":"CVE-2026-28231-93ddbcc7"}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P"}]}