CVE-2026-117541: svg-sanitizer uncaught LogicException in sanitize()

CVE-2026-117541 · Severity: medium · CVSS 5.3 · Published 2026-10-27

svg-sanitizer is a PHP library that removes malicious code from SVG documents. An unhandled exception vulnerability allows attackers to crash PHP applications by submitting well-formed XML documents that lack a proper SVG root element, causing worker processes or request handlers to fail with a fatal error rather than gracefully rejecting the input.

Technologies: Enshrined Svg-Sanitizer. Vendors: Enshrined.

Quick answers

Is CVE-2026-117541 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-117541 being exploited in the wild.
How severe is CVE-2026-117541?
Medium severity, with a CVSS score of 5.3, published 27 October 2026.
Which products and versions are affected?
Enshrined Svg-Sanitizer 0.11.0 to 1.0.0.
Is there a fix for CVE-2026-117541?
Yes: fixed in 1.1.0. Until then: Wrap sanitize() calls in a try/catch (\Throwable) block until you upgrade, or pre-validate that input XML contains exactly one top-level <svg> element before calling sanitize(). Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-117541 attacked?
It is attacked over the network.
Am I affected by CVE-2026-117541?
Check whether you run Enshrined Svg-Sanitizer at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 1.1.0

Wrap sanitize() calls in a try/catch (\Throwable) block until you upgrade, or pre-validate that input XML contains exactly one top-level <svg> element before calling sanitize().

Technical details

The Sanitizer::sanitize() method constructs an XPath object without catching exceptions; if the parsed XML document lacks exactly one top-level <svg> element as a direct child, XPath::handleDefaultNamespace() throws an uncaught LogicException instead of returning false as documented. This occurs in versions 0.11.0 through 1.0.0; the vulnerability is triggered by well-formed XML with a non-SVG root, nested SVG, or zero top-level SVG elements.

Affected products

  • enshrined svg-sanitizer 0.11.0 to 1.0.0

Timeline

  • 2026-10-19: advisory: GitHub security advisory published
  • 2026-10-27: disclosed: CVE-2026-117541 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.