CVE-2022-23515
JSON

6.1medium

Improper neutralization of data URIs may allow XSS in Loofah

Severity
6.1medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.88% (higher than 60% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-228g-948r-83gx

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.

Affected

Product or packageVersionsReported by
flavorjones loofah>= 2.1.0, < 2.19.1CVE List
loofah (RubyGems)from 2.1.0 before 2.19.1GitHub Advisory Database
loofah_project loofahfrom 2.1.0 before 2.19.1NVD
debian debian_linux10.0NVD

All scores

GitHub_M6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

What each source says

CVE List

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.

GitHub Advisory Database

Summary

Loofah >= 2.1.0, < 2.19.1 is vulnerable to cross-site scripting via the image/svg+xml media type in data URIs.

Mitigation

Upgrade to Loofah >= 2.19.1.

Severity

The Loofah maintainers have evaluated this as Medium Severity 6.1.

References

Credit

This vulnerability was responsibly reported by Maciej Piechota (@haqpl).

NVD (es)

Loofah es una librería general para manipular y transformar documentos y fragmentos HTML / XML, construida sobre Nokogiri. Loofah &gt;= 2.1.0, &lt; 2.19.1 es vulnerable a Cross-Site Scripting (XSS) a través del tipo de medio image/svg+xml en las URI de datos. Este problema está parcheado en la versión 2.19.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2022-23515 changed 2025-11-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-228g-948r-83gx changed 2025-11-04CC-BY-4.0
NVDCVE-2022-23515 changed 2026-06-17Public domain