# WP SVG Images <= 4.5 - Authenticated (Author+) Stored Cross-Site Scripting via SVG File Upload Sanitization Bypass

- **ID:** WPSEC-2026-3659
- **Plugin:** WP SVG Images (`wp-svg-images`), https://wordpress.org/plugins/wp-svg-images/
- **Affected versions:** from 4.0 before 4.6
- **Fixed in:** 4.6 (Update to 4.6 or later.)
- **Severity:** Medium 6.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-11-21)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/wp-svg-images
- **Fix released:** 2026-11-20
- **Published:** 2026-11-21
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3659/

## Description

The WP SVG Images plugin for WordPress is vulnerable to Stored Cross-Site Scripting via SVG file uploads in all versions up to, and including, 4.5. This is due to sanitization running only when the detected MIME type of the content was SVG, while files were accepted and served as SVG based on their .svg or .svgz extension. A file starting with a comment or a line break, or any .svgz file, could therefore skip sanitization, and sideloaded files were not covered either. This makes it possible for authenticated attackers with author-level access and above, or any role allowed to upload SVG files, to inject arbitrary web scripts that execute whenever a user accesses the uploaded file.

## References

- https://wpsec.com/vuln/WPSEC-2026-3659/
- https://plugins.svn.wordpress.org/wp-svg-images/tags/4.6/
- https://wordpress.org/plugins/wp-svg-images/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-3659/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
