Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide means to reject malicious or large images which can lead to denial-of-service #105

Open
coobird opened this issue Nov 3, 2016 · 0 comments

Comments

@coobird
Copy link
Owner

coobird commented Nov 3, 2016

Highly-compressed images in the form of large PNGs or malicious PNG decompression bombs could lead to OutOfMemoryErrors.

While I haven't researched whether decompression bombs can actually happen with the default PNG reader bundled with Java, if such things can happen, then a countermeasure against them would be nice to incorporate in Thumbnailator.

Also, OOMs from large images could be avoided by first checking the dimensions of the image.

If a image is rejected, it may be useful to return the images which failed via a callback mechanism. (Perhaps something like a RejectedImageListener that is given via one of the top-level API method, which enables this feature.)

References:

@coobird coobird changed the title Provide means to reject large images which cannot be safely processed Provide means to reject malicious or large images which can lead to denial-of-service Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant