跳到正文
GitHub 安全公告库 (GHSA)·· 22 小时前精选AI 评分60

Pillow APNG 在解压炸弹检查前按 IHDR 尺寸分配内存,附复现脚本与补丁

Pillow: APNG background disposal allocates full canvas before decompression bomb check

AI 导读

Pillow 的 PngImageFile._seek() 在处理首个 fcTL 请求 OP_BACKGROUND 时,会先按 IHDR 声明尺寸调用 Image.core.fill 分配并清零整块画布,之后 Image.open() 的 _decompression_bomb_check 才执行。

为什么值得看

材料给出可运行的复现脚本与两份补丁,说明 APNG 在炸弹检查前按声明尺寸分配内存的路径。

来源:GitHub 安全公告库 (GHSA) · github.com