Vulnerabilities / Safe SVG / WPSEC-2026-1787

Safe SVG <= 2.5.1 - Authenticated (Author+) Stored Cross-Site Scripting via SVG File Upload

Medium 5.4 CWE-79Fixed in 2.5.2
ID
WPSEC-2026-1787
Plugin
Safe SVG (safe-svg)
Affected
all versions 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:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
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 Stored Cross-Site Scripting via SVG file uploads in all versions up to, and including, 2.5.1. This is due to insufficient sanitization in the bundled enshrined/svg-sanitize library (1.0.0), which kept the attributeName attribute on allowed SMIL animation elements such as animateTransform, so an animation could rewrite a link's href into a javascript: URI after sanitization. This makes it possible for authenticated attackers with Author-level access and above, or any role allowed to upload SVG files, to upload SVG files that execute arbitrary web scripts when a user clicks a link in the SVG in a browser that allows this retargeting, such as Safari, whether the file is opened directly or shown inline by the Safe SVG block.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON or Markdown · All advisories: JSON, RSS

License: CC BY 4.0