---
id: "CVE-2026-121445"
kind: "vulnerability"
aliases: ["CVE-2026-121445"]
title: "svg-sanitizer: regex flaw lets crafted SVGs exhaust CPU or bypass sanitizing"
severity: "high"
cvss: 8.2
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["node", "package", "svg-sanitizer", "user-uploads"]
not_affected_if: ["not-using-svg-sanitizer", "removeremotereferences-disabled"]
published_at: "2026-11-03T15:17:36+00:00"
first_seen_at: "2026-11-03T15:22:01+00:00"
updated_at: "2026-11-03T15:22:45+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-121445", "first_seen_at": "2026-11-03T15:22:01+00:00"}]
---

# svg-sanitizer: regex flaw lets crafted SVGs exhaust CPU or bypass sanitizing

The svg-sanitizer npm package has a regular expression denial of service flaw in its remote CSS token stripping when removeRemoteReferences is enabled. Crafted SVGs with many unclosed image-set tokens can exhaust CPU, or make sanitize() throw and return unsanitized content.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version of `svg-sanitizer` in your lockfile or with `npm ls svg-sanitizer`
- Look for calls to `sanitize()` with `removeRemoteReferences` enabled on user-supplied SVGs

## Fix

- `svg-sanitizer` move to `1.1.0` or later

## Timeline

- 2026-11-03T15:22:01+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-121445

## Documents

- [advisory] Vendor advisory: github.com https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-94x8-pw3c-6qcq
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/svg-sanitizer-1.0.0-before-1.1.0-redos-and-fail-open-via-image-set-css-stripping

## From the sources

darylldoyle svg-sanitizer from 1.0.0 before 1.1.0 contains a regular expression denial of service vulnerability in the image-set pattern of stripRemoteCssTokens() when removeRemoteReferences is enabled. Attackers can submit SVGs with many unclosed image-set tokens to exhaust CPU, or trigger PCRE limits causing sanitize() to throw a TypeError and leave unsanitized content.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
