# CVE-2026-126209: Loofah allowed_uri? treats javascript&#x3a alert(1) as safe

- Severity: Medium 5.3 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA: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.44%, higher than 40% of CVEs (2026-12-01)
- Published: 2026-11-12T21:01:58.128Z
- Modified: 2026-11-16T20:18:59.543Z
- Also known as: GHSA-p9wj-w8xq-vjx6
- Weaknesses: CWE-79, CWE-184
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. From 2.25.0 until 2.25.3, Loofah::HTML5::Scrub.allowed_uri? strips whitespace and control characters before decoding a semicolon-less numeric character reference, changing where the reference ends and hiding a javascript: or vbscript: scheme that a browser reconstructs. The bypass applies to encoded colons and encoded scheme letters when a stripped character terminates the numeric reference. An application that renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting, and Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes entities before URI evaluation. This issue is fixed in version 2.25.3.

(As written by CVE List.)

## Affected

- flavorjones loofah: >= 2.25.0, < 2.25.3
- loofah (RubyGems): from 2.25.0 before 2.25.3

## Every score

- GitHub_M: CVSS:4.0 5.3 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`

## References

- <https://github.com/flavorjones/loofah/security/advisories/GHSA-p9wj-w8xq-vjx6> (web)
- <https://github.com/flavorjones/loofah/pull/324> (web)
- <https://github.com/flavorjones/loofah/commit/62c04841e8252a1b5373afcd2b89fb9b8279e317> (web)
- <https://github.com/flavorjones/loofah/releases/tag/v2.25.3> (web)
- <https://github.com/flavorjones/loofah> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-p9wj-w8xq-vjx6.yml> (web)

## Sources

- CVE List: [CVE-2026-126209](https://www.cve.org/CVERecord?id=CVE-2026-126209), CVE Terms of Use, modified 2026-11-16
- GitHub Advisory Database: [GHSA-p9wj-w8xq-vjx6](https://github.com/advisories/GHSA-p9wj-w8xq-vjx6), CC-BY-4.0, modified 2026-11-12
- NVD: [CVE-2026-126209](https://nvd.nist.gov/vuln/detail/CVE-2026-126209), Public domain, modified 2026-11-16

---

Page: https://cve.day/CVE-2026-126209 · Whole record: https://cve.day/CVE-2026-126209.json · Rebuilt by cve.day 2026-11-25T22:59:50.565Z
