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

Source: https://junglewise.ai/threats/cve-2026-117541-svg-sanitizer-from-0-11-0-before-1-1-0-contains-an-uncaught  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-27. Updated: 2026-10-27  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/svg-sanitizer). Vendors: [Enshrined](https://junglewise.ai/threats/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

- [https://github.com/darylldoyle/svg-sanitizer/commit/9ba9001493f5da737759303f13bd965ebdaa778c](https://github.com/darylldoyle/svg-sanitizer/commit/9ba9001493f5da737759303f13bd965ebdaa778c)
- [https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-cgcm-4g72-hfgw](https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-cgcm-4g72-hfgw)

## Related threats

- [svg-sanitizer cross-site scripting via animateTransform](https://junglewise.ai/threats/cve-2026-121447-svg-sanitizer-before-1-1-0-contains-a-cross-site-scripting)
- [svg-sanitizer incomplete URL filtering in SVG attributes](https://junglewise.ai/threats/cve-2026-121446-svg-sanitizer-from-0-5-0-before-1-1-0-contains-an-incomplete)
- [svg-sanitizer algorithmic complexity denial of service in use reference-graph analysis](https://junglewise.ai/threats/cve-2026-121444-svg-sanitizer-from-0-11-0-before-1-1-0-contains-an-algorithmic)
- [svg-sanitizer denial of service via unclosed tag](https://junglewise.ai/threats/cve-2026-121443-svg-sanitizer-from-1-1-0-before-1-1-1-contains-a-denial-of)
- [svg-sanitizer quadratic DoS in PHP tag stripping](https://junglewise.ai/threats/cve-2026-117540-svg-sanitizer-from-0-5-3-before-1-1-0-contains-a-denial-of)
