## Pillow: Heap buffer overflow in ImagingJpegDecode

- 種別: advisory
- 重大度: critical
- 関連技術: python
- CVE: CVE-2026-112403
- 公開日時: 2026-10-20T20:40:07.000Z
- 情報源: GitHub Advisory Database (https://github.com/advisories/GHSA-8g5g-8vmr-9782)
- パーマリンク: https://vulnpulse.app/items/ghsa-ghsa-8g5g-8vmr-9782

影響: pip:Pillow <= 12.3.0 → 13.0.0
Summary JpegImageFile.draft() — which Image.thumbnail() calls automatically — requests 1/2, 1/4 or 1/8 scaled JPEG output and shrinks self._size and the tile extents to match, so _setimage() allocates a single-row decode buffer of ceil(W/s) samples. ImagingJpegDecode() sets cinfo.scale_num/scale_denom, calls jpeg_start_decompress(), and then reads scanlines into that buffer without ever comparing cinfo.output_width, cinfo.output_height or cinfo.out_color_components against state->xsize, state->…