Skip to content

Fix CVE-2025-61457: Sanitize SVG files on upload to prevent XSS attacks (for sharp 8.0) - #688

Open
rycks wants to merge 1 commit into
code16:8.xfrom
rycks:8.0-fix-cve-2025-61457
Open

Fix CVE-2025-61457: Sanitize SVG files on upload to prevent XSS attacks (for sharp 8.0)#688
rycks wants to merge 1 commit into
code16:8.xfrom
rycks:8.0-fix-cve-2025-61457

Conversation

@rycks

@rycks rycks commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

As i'm blocked by php 8.2 version on my server here is i hope a fix for the CVE-2025-61457 for sharp 8.0:

  • Add enshrined/svg-sanitize dependency
  • Add setSanitizeSvg() method to SharpFormFieldWithUpload trait (enabled by default)
  • Sanitize SVG files in UploadFormatter after storage
  • Add tests for SVG sanitization
- Add enshrined/svg-sanitize dependency
- Add setSanitizeSvg() method to SharpFormFieldWithUpload trait (enabled by default)
- Sanitize SVG files in UploadFormatter after storage
- Add tests for SVG sanitization
@rycks rycks changed the title Fix CVE-2025-61457: Sanitize SVG files on upload to prevent XSS attacks Jan 21, 2026
@aguingand

Copy link
Copy Markdown
Contributor

Thank you, I will merge this after #687 is OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants