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 package | Versions | Reported by |
|---|---|---|
| flavorjones loofah | >= 2.1.0, < 2.19.1 | CVE List |
| loofah (RubyGems) | from 2.1.0 before 2.19.1 | GitHub Advisory Database |
| loofah_project loofah | from 2.1.0 before 2.19.1 | NVD |
| debian debian_linux | 10.0 | NVD |
All scores
| GitHub_M | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS: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
- CWE - CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (4.9)
- SVG MIME Type (image/svg+xml) is misleading to developers · Issue #266 · w3c/svgwg
- https://hackerone.com/reports/1694173
- https://github.com/flavorjones/loofah/issues/101
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 >= 2.1.0, < 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
| 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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-23515 changed 2025-11-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-228g-948r-83gx changed 2025-11-04 | CC-BY-4.0 |
| NVD | CVE-2022-23515 changed 2026-06-17 | Public domain |