{"schema":"threatline.record/2","record":{"id":"CVE-2026-114501","aliases":["GHSA-654x-cwwv-5j9c"],"summary":"Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT > 1","details":"### 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.","categories":["Libraries & packages"],"product":"Pillow","vendor":"python-pillow","ecosystem":"pip","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-654x-cwwv-5j9c","source_modified_at":"2026-10-23T21:53:25Z","fetched_at":"2026-10-23T22:01:05.715934Z","package":{"ecosystem":"pip","name":"Pillow"},"range":">= 11.2.1, < 13.0.0"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-114501","source_modified_at":"2026-10-21T21:17:09.748Z","fetched_at":"2026-10-23T18:42:43.628194Z","product":"Pillow","vendor":"python-pillow","versions":[{"status":"affected","version":">= 11.2.1, < 13.0.0"}],"defaultStatus":null},{"source":"GitHub Advisory Database","source_url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-654x-cwwv-5j9c","source_modified_at":"2026-10-21T21:16:21Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"ecosystem":"pip","name":"Pillow"},"range":"11.2.1 - 13.0.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-654x-cwwv-5j9c","source_modified_at":"2026-10-23T22:00:03.744757414Z","fetched_at":"2026-10-23T22:01:05.715934Z","package":{"name":"pillow","ecosystem":"PyPI","purl":"pkg:pypi/pillow"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"11.2.1"},{"fixed":"13.0.0"}]}],"versions":["11.2.1","11.3.0","12.0.0","12.1.0","12.1.1","12.2.0","12.3.0"]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-654x-cwwv-5j9c","source_modified_at":"2026-10-23T21:53:25Z","fetched_at":"2026-10-23T22:01:05.715934Z","package":{"ecosystem":"pip","name":"Pillow"},"version":"13.0.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-654x-cwwv-5j9c","source_modified_at":"2026-10-23T22:00:03.744757414Z","fetched_at":"2026-10-23T22:01:05.715934Z","package":{"name":"pillow","ecosystem":"PyPI","purl":"pkg:pypi/pillow"},"version":"13.0.0"}],"cvss":6.3,"severity":"Medium","kev":{"listed":false},"epss":{"probability":0.00384,"percentile":0.31246,"score_date":"2026-10-23"},"published_at":"2026-10-21T21:17:09.748Z","modified_at":"2026-10-23T22:00:03.744757414Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-654x-cwwv-5j9c","fetched_at":"2026-10-23T22:01:05.715934Z","source_modified_at":"2026-10-23T21:53:25Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-114501","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-21T21:17:09.748Z"},{"source":"GitHub Advisory Database","url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-654x-cwwv-5j9c","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-21T21:16:21Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-654x-cwwv-5j9c","fetched_at":"2026-10-23T22:01:05.715934Z","source_modified_at":"2026-10-23T22:00:03.744757414Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-114501","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-654x-cwwv-5j9c","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114501","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/python-pillow/Pillow/pull/10172","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/python-pillow/Pillow/commit/19f64946eb247b973dd4560be7dea3bf979d2e6a","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-654x-cwwv-5j9c","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"product","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-23T22:00:03.744757414Z","content_hash":"c265f659ef19a23578ac3d4fe425decf77d8159f56ae0d6a0f520281584b8109"}}
