Skip to content

Add decompression bomb check when loading WmfStubImageFile at a different DPI - #9984

Merged
hugovk merged 1 commit into
python-pillow:mainfrom
radarhere:wmf_load
Sep 11, 2026
Merged

Add decompression bomb check when loading WmfStubImageFile at a different DPI#9984
hugovk merged 1 commit into
python-pillow:mainfrom
radarhere:wmf_load

Conversation

@radarhere

@radarhere radarhere commented Sep 11, 2026

Copy link
Copy Markdown
Member

#4311 added the ability for WmfImagePlugin to load() images at a different size than they were open()ed with, by passing an extra dpi argument, like im.load(100).

This adds a decompression bomb check for the final size.

Credit to @Tednoob17 and @leemoon-42 for reporting this possibility.

@radarhere radarhere changed the title Add decompression bomb check when loading WMF at a different DPI Add decompression bomb check when loading WmfStubImageFile at a different DPI Sep 11, 2026
@hugovk
hugovk merged commit 0253ef0 into python-pillow:main Sep 11, 2026
68 of 72 checks passed
@radarhere
radarhere deleted the wmf_load branch September 11, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants