Pillow is a Python imaging library. From 5.1.0 until 12.3.0, PdfParser.PdfStream.decode() in PIL/PdfParser.py calls zlib.decompress() with bufsize set to the PDF stream Length field without bounding the decompressed output size, allowing a crafted FlateDecode PDF stream to exhaust memory from a small file. This issue is fixed in version 12.3.0.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-400",
"CWE-770"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59200.json"
}{
"extracted_events": [
{
"cpe": "cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.1.0"
},
{
"fixed": "12.3.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "f7a31ea75e460e108c37126da1f47812f21f6b09"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "12.3.0",
"range": [
{
"fixed": "bb1d8e8ab8d29048624d96e3ee53cecf7c13d13d"
}
],
"source": "REFERENCES_TAG"
}
]
}