-
Notifications
You must be signed in to change notification settings - Fork 88
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
Are we affected by CVE-2023-5129 ? #140
Comments
Thanks for bringing this up. The main docker image for Thumbor is based on I'll go ahead and try to rebuild it anyway. But it'd be worth double-checking that it does indeed fix the CVE rather than just blindly assume it would. |
I pushed a new image, based on python:3.11 with sha256: |
I think it can be verified, at least partly, with running this in the container: apt update && apt list --upgradeable|grep webp If there is no result, then it means it have the latest package available. |
@ariselseng I dont think this will work as expected. I tried The only package I'm aware of is the pillow package using the So my guess is:
€dit: |
Thank you @Speedy1991. Then I guess we should report this upstream? even though it was already mentioned (EDIT: I didn't realize it was you, haha) |
@heynemann can you look into what it means to upgrade Pillow? it's possible that Thumbor is currently vulnerable to this webp vulnerability currently? (I'm not even sure how to verify it, but it is potentially a high-risk issue) |
In the mean time. Is it possible to disable webp input in thumbor? |
Pillow is shipping with libwebp. When building it from source it should use the OS' packages, I didn't succeed in forcing it to do so for our Docker deployment yet. I was following the instructions from Ben Hawkes blog to produce a proof-of-concept webp image. When serving it with thumbor, I get a stacktrace like this:
As the image is not going to be anything that can be displayed, we might also get an error with the patched libwebp, hopefully a different one. Upgrading Pillow to the most recent version is not an option as Thumbor requires Pillow 9.*. Only Pillow 10.0.1 seems to be fixed, there has been no release in the 9.x series recently. Possible solutions:
As Thumbor is handling user data and usually has access to some kind of cloud storage, it's probably an interesting target for hackers. Any other ideas for how we can mitigate the risk? Currently, either building Pillow from source or forking the 9.x series seem to be the most straightforward solutions. |
Will work on this on the weekend, but if someone wants to tackle this in thumbor, it would be AWESOME :) I can provide help to fix thumbor to use the new pillow version. |
I think this is fixed in upstream now. Is it possible to close this issue now with a new build? |
That's great. Did they release a new version with the fix? |
Looks like the latest is 7.5.2 from July https://pypi.org/project/thumbor/#history @heynemann can you push a new version to pypi? and then we can rebuild the docker image as well. |
SIMD images are still using Pillow 9.x unfortunately which seems vulnerable. See #141 and uploadcare/pillow-simd#129 |
This changes are unrelated to Pillow-simd, which doesn’t have binary builds. It always uses system-provided versions of libraries |
Thank you @homm. Can someone test which version of libwebp is used with the SIMD image? (or perhaps help with instructions on how to verify it conclusively). |
@anselm-helbig perhaps you can help? |
Closing due to inactivity. |
thumbor/thumbor#1591
Maybe a simple rebuild of the image is enough to fix it?
The text was updated successfully, but these errors were encountered: