CVE-2026-126079
Medium 6.1No known exploitationFix availableAction View: Possible XSS vulnerability in Action View text helpers
Vendor advisory: GHSA-2p2f-4rq4-gjwc
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
No EPSS score available
CISA remediation deadline
Not in the KEV catalog
Description
### Impact With the HTML5 sanitizer (`Rails::HTML5::Sanitizer`, the default vendor on CRuby for applications using `load_defaults 7.1` or later), Nokogiri before 1.19.5 serializes ` ` unescaped inside attribute values. The Action View text helpers `highlight` and `simple_format` sanitize their input and then process the resulting HTML as a string: `highlight` splits it on tag boundaries to insert matches, and `simple_format` splits it into paragraphs on blank lines. An unescaped `>` or a blank line inside an attribute value could cause markup in that value, which the sanitizer left inert, to be emitted as live elements in the helper's `html_safe` output, possibly leading to XSS. Applications that use the HTML5 sanitizer and pass untrusted text to `highlight`, or to `simple_format` with `html_options`, are affected. ### Details The fixed releases require rails-html-sanitizer 1.7.2 or later, which requires Loofah 2.25.3 and Nokogiri 1.19.5. With these versions, the HTML5 sanitizer escapes ` ` in attribute values as `<` and `>`, as the HTML4 sanitizer already does. The parsed DOM is unchanged, but code or tests that compare sanitized HTML as a string may see the new serialization. ##…
Weakness: CWE-79
Patching and mitigation
- Patch status
- Fix available (source: Microsoft MSRC)
- Fix documented (source date)
- Mitigation
- None documented
- Vendor guidance
- msrc.microsoft.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| Microsoft | azl4 rubygem-actionview 8.0.2-5.azl4 on Azure Linux 4.0 | Not documented | Not documented | Microsoft MSRC |
| rubygems | actionview | from 8.1.0.beta1 before 8.1.4.1 | 8.1.4.1 | GitHub Advisory Database |
| rubygems | actionview | all versions before 8.0.5.2 | 8.0.5.2 | GitHub Advisory Database |
Timeline
Advisory
Microsoft advisory published
Patch
Fix documented by Microsoft MSRC
Vendor guidance and references
- Microsoft Security Update Guide (opens in a new tab)vendor-advisory
- GitHub Advisory GHSA-2p2f-4rq4-gjwc (opens in a new tab)github-advisory