Vulnerability · Published Aug 12, 2025 · Assigned by GitHub_M

CVE-2025-55166svg-sanitizer By-Passing Attribute Sanitization

Medium 5.1

In plain English

A medium-severity cross-site scripting in svg-sanitizer from darylldoyle. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)5.1Medium
Exploit odds (30 days)0.5%top 54.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

savg-sanitizer is a PHP SVG/XML sanitizer. Prior to version 0.22.0, the sanitization logic in the cleanXlinkHrefs method only searches for lower-case attribute name, which allows to by-pass the isHrefSafeValue check. As a result this allows cross-site scripting or linking to external domains. This issue has been patched in version 0.22.0.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Packagistenshrined/svg-sanitize0.22.0GHSA-22wq-q86m-83fh

Affected products (as reported)

VendorProductVersions
darylldoyle svg-sanitizer < 0.22.0

Weakness: CWE-79, CWE-601 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

References