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

fpdf2 depends on Pillow version having security vulnerability #628

Closed
aleksilahis opened this issue Dec 15, 2022 · 3 comments
Closed

fpdf2 depends on Pillow version having security vulnerability #628

aleksilahis opened this issue Dec 15, 2022 · 3 comments
Labels

Comments

@aleksilahis
Copy link

Pillow <9.3.0 has security vulnerability described here: https://pyup.io/v/51886/f17
fpdf2 depends on Pillow >=6.2.2, so having fpdf2 in dependencies causes for example safety check to fail because of Pillow.

@Lucas-C
Copy link
Member

Lucas-C commented Dec 15, 2022

Thank you for the report.

I'm fine with specifying a higher minimal version of Pillow in fpdf2 dependencies, but for the record this vulnerability seems very minor, based on the PR that fixed the vulnerability ( python-pillow/Pillow#6700 ):

  • it's a potential Denial Of Service, not an attack vector that would provide control over the app / system to an attacker
  • it only concerns TIFF files
  • fpdf2 does not touch this SAMPLESPERPIXEL vulnerable setting in any way. If an application provides a way to alter this setting, that would be from code outside fpdf2 (and then potentially the PIL.Image could be passed to FPDF.image())

@Lucas-C Lucas-C added security and removed bug labels Dec 15, 2022
@gmischler
Copy link
Collaborator

  • fpdf2 does not touch this SAMPLESPERPIXEL vulnerable setting in any way.

If I understand it correctly, then SAMPLESPERPIXEL is a tag in TIFF files. In other words, any software using fpdf2 (and thus Pillow) could be made to crash by feeding it a maliciously manipulated TIFF file. Apparently only version 9.2.0 is affected, which was current from july to october of this year.

@Lucas-C
Copy link
Member

Lucas-C commented Dec 19, 2022

Ah I see, alright. Thank you @gmischler

I opened #630 to forbid Pillow 9.2.0 as a dependency of fpdf2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants