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

SixLabors.ImageSharp.Drawing has potential vulnerability #627

Closed
plade opened this issue Sep 29, 2023 · 6 comments
Closed

SixLabors.ImageSharp.Drawing has potential vulnerability #627

plade opened this issue Sep 29, 2023 · 6 comments

Comments

@plade
Copy link

plade commented Sep 29, 2023

Describe the bug
SixLabors.ImageSharp.Drawing version needs to be upgraded to 2.0.0 or later.
Previous versions use SixLabors.ImageSharp with a potential vulnerability that was fixed in PR SixLabors/ImageSharp#2524

@plade
Copy link
Author

plade commented Sep 29, 2023

It looks like SixLabors.ImageSharp.Drawing is not netstandard anymore, so this will need a bit more work than just upgrading the package.

@danielpalme
Copy link
Owner

I think that's a minor issue.

ReportGenerator uses ImageSharp to generate images/badges. It does not process arbitrary images from outside. So it's not possible to exploit the vulnerability in this context.

@plade
Copy link
Author

plade commented Sep 30, 2023

Yes I believe it's quite a non-issue.

Would you mind if I tried to contribute and fix it as a small project for myself?

@danielpalme
Copy link
Owner

Sure. Maybe there a way to replace ImageSharp completely, as it's only used for some simple rendering.

@danielpalme
Copy link
Owner

I think I will remove ImageSharp completely.
It's only used for:

  • some PNG badges. They already have an SVG alternative.
  • A PNG chart. This can be also replaced by an SVG image.

@danielpalme
Copy link
Owner

Made the necessary changes in ae8c4fc.

  • Report type PngChart is now replaced with SvgChart.
  • Badges in PNG format are no longer generated
  • Fallback PNG history charts (only visible in HTML report, if JavaScript is disabled) are also in SVG format (and look much better now)

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

No branches or pull requests

2 participants