-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix(security): Bump Pillow #19662
fix(security): Bump Pillow #19662
Conversation
It seems that Pillow has released CVEs without actually releasing the versions that supposedly fix the security issues. |
a43716d
to
652cdf6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to unblock our CI, but we should follow up on this
All these CVEs affect decoding of some less popular image formats (FLI, PCX, TIFF, JPEG 2000, SGI-RLE): python-pillow/Pillow#4538 So, I imagine not many people at all would care if we blocked everything but JPEG or PNG uploads. I know JPEG 2000 is slowly gaining in popularity, but hopefully we're on py3 by the time it's more universal? The format can be identified by reading |
I don't know when decoding happens. If it happens when trying to figure out
the image type it's not that much of a win. Generally disabling everything
but jpeg and png sounds like a good idea though. I bet we could convert the
rest in the frontend if we had to
…On Wed, Jul 1, 2020, 20:14 josh ***@***.***> wrote:
All these CVEs affect decoding of some less popular image formats (FLI,
PCX, TIFF, JPEG 2000, SGI-RLE): python-pillow/Pillow#4538
<python-pillow/Pillow#4538>
So, sentry.models.avatar.get_cached_photo is unaffected (it only resizes
and encodes into PNG).
I imagine not many people at all would care if we blocked everything but
JPEG or PNG uploads. I know JPEG 2000 is slowly gaining in popularity, but
hopefully we're on py3 by the time it's more universal?
The format can be identified by reading Image.format after an image open,
or stdlib imghdr although if you search for "imghdr python bug" you get a
lot of hits, haha. A few that look pretty good (but are py3-only):
https://github.com/cdgriffith/puremagic,
https://github.com/h2non/filetype.py. Calibre also maintains their own
imghdr.py
<https://github.com/kovidgoyal/calibre/blob/master/src/calibre/utils/imghdr.py>
and I believe the creator/primary maintainer intends to support py2 for a
long time.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#19662 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGMPRNHQJMCDSQ5PHTQZNTRZN4G7ANCNFSM4ONHLETA>
.
|
Image types are generally(?) inferred from magic bytes, not during decoding. But I have not verified this. |
See https://nvd.nist.gov/vuln/detail/CVE-2020-10379