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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.88%, higher than 60% of CVEs (2026-12-01)
- Published: 2022-12-13T17:39:36.000Z
- Modified: 2026-06-17T04:30:16.723Z
- Also known as: GHSA-228g-948r-83gx
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- flavorjones loofah: >= 2.1.0, < 2.19.1
- loofah (RubyGems): from 2.1.0 before 2.19.1
- loofah_project loofah: from 2.1.0 before 2.19.1
- debian debian_linux: 10.0

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/flavorjones/loofah/security/advisories/GHSA-228g-948r-83gx> (third-party-advisory, web)
- <https://github.com/flavorjones/loofah/issues/101> (issue-tracking, third-party-advisory, web)
- <https://hackerone.com/reports/1694173> (permissions-required, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2023/09/msg00011.html> (mailing-list, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00044.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-23515> (advisory)
- <https://github.com/w3c/svgwg/issues/266> (web)
- <https://github.com/flavorjones/loofah/commit/415677f3cf7f9254f42f811e784985cd63c7407f> (web)
- <https://github.com/flavorjones/loofah> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/CVE-2022-23515.yml> (web)

## Sources

- CVE List: [CVE-2022-23515](https://www.cve.org/CVERecord?id=CVE-2022-23515), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-228g-948r-83gx](https://github.com/advisories/GHSA-228g-948r-83gx), CC-BY-4.0, modified 2025-11-04
- NVD: [CVE-2022-23515](https://nvd.nist.gov/vuln/detail/CVE-2022-23515), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-23515 · Whole record: https://cve.day/CVE-2022-23515.json · Rebuilt by cve.day 2026-11-25T22:58:17.524Z
