Skip to content
High 8.8

Pillowで細工した画像の保存時にヒープ領域を破壊されコード実行のおそれ

CVE-2026-96778 First seen on SecPulse

Summary

Pillow の JPEG 保存処理で、ICC プロファイルがエンコーダのバッファをちょうど埋めた場合に、COM コメントの書き込みでヒープ領域が上書きされる脆弱性です。影響を受けるのは 9.4.0 から 13.0.0 未満の Pillow で、クラッシュやコード実行のおそれがあります。13.0.0 以降に更新してください。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

Pillow の JPEG 保存処理で、ICC プロファイルがエンコーダのバッファをちょうど埋めた場合に、COM コメントの書き込みでヒープ領域が上書きされる脆弱性です。影響を受けるのは 9.4.0 から 13.0.0 未満の Pillow で、クラッシュやコード実行のおそれがあります。13.0.0 以降に更新してください。

Affected packages

PackageAffected → Fixed
python-pillowPillow —
pipPillow
< 13.0.0→ 13.0.0
PyPIpillow
≥ 9.4.0, < 13.0.0→ 13.0.0
Bitnamipillow
≥ 9.4.0, < 13.0.0→ 13.0.0

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

Pillow is a Python imaging library. From 9.4.0 until 13.0.0, ImagingJpegEncode() in src/libImaging/JpegEncode.c can call jpeg_write_marker() for a JPEG COM comment when an ICC profile has exactly filled the 65536-byte encoder buffer. libjpeg writes one byte before checking the exhausted free_in_buffer counter, which then wraps and permits the attacker-controlled comment and subsequent compressed image data to overwrite adjacent heap memory. Re-saving an untrusted image as JPEG while preserving its ICC profile and forwarded comment can crash the process and may enable code execution in suitable runtime and heap layouts. This issue is fixed in version 13.0.0.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details