{"id":"CVE-2026-114501","aliases":["CVE-2026-114501","GHSA-654x-cwwv-5j9c","BIT-PILLOW-2026-114501","PYSEC-2026-4336"],"related":[],"kind":"vulnerability","state":"published","title":"Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT > 1","summary":"Pillow is a Python imaging library. From 11.2.1 until 13.0.0, Arrow export assumes that an image's rows are tightly contiguous and exports from im->blocks[0].ptr even when PILLOW_ALIGNMENT makes aligned_linesize include row padding or an aligned offset before the first row. The resulting Arrow buffer can include uninitialized padding, bytes preceding the first row, or stale heap contents from previously freed images. Applications that configure alignment and export images to Arrow can therefore disclose one user's pixels or other process memory to another user. This issue is fixed in version 13.0.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Pillow is a Python imaging library. From 11.2.1 until 13.0.0, Arrow export assumes that an image's rows are tightly contiguous and exports from im->blocks[0].ptr even when PILLOW_ALIGNMENT makes aligned_linesize include row padding or an aligned offset before the first row. The resulting Arrow buffer can include uninitialized padding, bytes preceding the first row, or stale heap contents from previously freed images. Applications that configure alignment and export images to Arrow can therefore disclose one user's pixels or other process memory to another user. This issue is fixed in version 13.0.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nWhen [`PILLOW_ALIGNMENT`](https://pillow.readthedocs.io/en/stable/reference/block_allocator.html#memory-pools) is set above 1, exporting an image to Arrow returns uninitialized heap memory mixed in with the pixel data. That memory can include pixels from images the process freed earlier. \n\n### Details\n\nWith an alignment above 1, the default allocator pads each row up to `aligned_linesize` and starts the first row at an aligned offset into the block. It then exports `im->blocks[0].ptr` as `xsize * ysize` tightly packed pixels, so exported data includes the padding bytes, and can include a few bytes from before the first row.\n\nTested vulnerable on 11.2.1, 12.3.0, 4c1ed27a5.\n\n### PoC\n\nWhether things leak may depend on allocator configuration. This does show a leak on my Mac.\n\n```python\nimport os\n\nos.environ[\"PILLOW_ALIGNMENT\"] = \"64\"\n\nfrom PIL import Image\n\n# Image A: 64 px wide, so its rows fill the whole aligned stride\na = Image.new(\"L\", (64, 40), 0x41).transpose(Image.Transpose.FLIP_LEFT_RIGHT)\ndel a\n\n# Image B: 61 px wide, so each row has 3 bytes of padding; its pixels are all 0\nb = Image.new(\"L\", (61, 40), 0).transpose(Image.Transpose.FLIP_LEFT_RIGHT)\n\ntry:\n    exported = Image.fromarrow(b, b.mode, b.size).tobytes()\nexcept ValueError as e:\n    print(\"Not vulnerable:\", e)\nelse:\n    if leaked := len(exported) - exported.count(0):\n        raise RuntimeError(f\"{leaked} of {len(exported)} exported bytes are not B's pixels\")\n```\n\n### Impact\n\nInformation disclosure for applications that set `PILLOW_ALIGNMENT` and export images to Arrow. Likely any image whose row length isn't a multiple of the alignment will do. In a service handling several users' images, one user's exported data can contain pixels from another user's image, or other stale heap contents.","format":"markdown","source":"ghsa"}],"published":"2026-10-21T21:17:09.748Z","modified":"2026-10-30T17:17:14.473Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-226","CWE-908"],"affected":[{"ranges":[{"version":">= 11.2.1, < 13.0.0","status":"affected"}],"vendor":"python-pillow","product":"Pillow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"11.2.1","status":"affected","fixed":"13.0.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"11.2.1","fixed":"13.0.0"}],"vendor":"python","product":"pillow","cpe":"cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"11.2.1","status":"affected","fixed":"13.0.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"11.2.1","status":"affected","fixed":"13.0.0"}],"ecosystem":"Bitnami","package":"pillow","purl":"pkg:bitnami/pillow","source":"bitnami"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-654x-cwwv-5j9c","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/pull/10172","tags":["issue-tracking","report","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/commit/19f64946eb247b973dd4560be7dea3bf979d2e6a","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["advisory","article","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114501","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/python-pillow/Pillow","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-10-30T16:09:56.498Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-114501","url":"https://www.cve.org/CVERecord?id=CVE-2026-114501","licence":"CVE Terms of Use","modified":"2026-10-30T16:10:03.645Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-654x-cwwv-5j9c","url":"https://github.com/advisories/GHSA-654x-cwwv-5j9c","licence":"CC-BY-4.0","modified":"2026-10-29T10:56:00.934Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-114501","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114501","licence":"Public domain","modified":"2026-10-30T17:17:14.473Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4336","url":"https://osv.dev/vulnerability/PYSEC-2026-4336","licence":"CC-BY-4.0","modified":"2026-10-29T10:56:00.934Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PILLOW-2026-114501","url":"https://osv.dev/vulnerability/BIT-PILLOW-2026-114501","licence":"Apache-2.0","modified":"2026-10-29T10:56:00.934Z"}],"updatedAt":"2026-11-25T22:59:46.701Z","epss":{"score":0.004,"percentile":0.36362,"date":"2026-12-01T12:00:22.000Z"}}