Vulnerabilities / Safe SVG / WPSEC-2026-1786
Safe SVG <= 2.5.1 - Authenticated (Contributor+) CSS Injection via Safe SVG Block Attributes
Medium 5.0
CWE-74Fixed in 2.5.2
- ID
- WPSEC-2026-1786
- Plugin
- Safe SVG (safe-svg)
- Affected
- from 2.1.0 before 2.5.2
- Remediation
- Update to 2.5.2 or later.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:N
- Weakness
- CWE-74
- Usage
- Plugin High · Affected versions High among sites WPSec scans, 2026-10-27
- Attack surface
- Safe SVG on WPSec AttackSurface
- Fix released
- Published
Description
The Safe SVG plugin for WordPress is vulnerable to CSS Injection via the Safe SVG block's alignment, backgroundColor, textColor and spacing attributes in all versions up to, and including, 2.5.1. This is due to the block's render callback placing these values into inline style attributes with only esc_attr(), which does not stop extra CSS declarations. This makes it possible for authenticated attackers with Contributor-level access and above to inject arbitrary CSS declarations into pages that contain the block, for example to overlay or restyle page content for visitors.
References
- https://wpsec.com/vuln/WPSEC-2026-1786/
- https://plugins.svn.wordpress.org/safe-svg/tags/2.5.2/
- https://wordpress.org/plugins/safe-svg/
Published by WPSec. Provided as is, without warranty. Corrections: contact us.
This advisory as JSON or Markdown · All advisories: JSON, RSS