---
id: "CVE-2026-117539"
kind: "vulnerability"
aliases: ["CVE-2026-117539"]
title: "svg-sanitizer: crafted SVG files can embed remote resources and leak data"
severity: "medium"
cvss: 5.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["file-upload", "node", "package", "self-hosted", "svg-sanitizer"]
not_affected_if: ["no-user-svg-upload", "not-using-svg-sanitizer"]
published_at: "2026-10-27T11:17:34+00:00"
first_seen_at: "2026-10-27T11:31:28+00:00"
updated_at: "2026-10-27T11:32:15+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-117539", "first_seen_at": "2026-10-27T11:31:28+00:00"}]
---

# svg-sanitizer: crafted SVG files can embed remote resources and leak data

The svg-sanitizer npm library before 1.0.0 fails to strip some CSS and remote href references from SVG files. An attacker who gets a crafted SVG processed by the library can make it load external resources, exfiltrate page data, track users, or reveal visitor IP addresses.

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

## How to check

- Check the installed version with `npm ls svg-sanitizer` or by reading `node_modules/svg-sanitizer/package.json`.
- Search the codebase for `svg-sanitizer` to find where uploaded SVGs are passed through it.

## Fix

- Upgrade svg-sanitizer to `1.0.0` or later.
- Until upgraded, serve sanitized SVGs with a strict Content-Security-Policy or render user SVGs as image files rather than inline markup.

## Timeline

- 2026-10-27T11:31:28+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-117539

## From the sources

darylldoyle svg-sanitizer before 1.0.0 contains CSS injection and remote reference bypass vulnerabilities that allow attackers to embed external resources by uploading crafted SVG files. Attackers can use unsanitized style content, unquoted url() values, or image href attributes to exfiltrate page data, track users, or disclose visitor IP addresses.

---

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