Skip to content
Threat Brief

← All advisories

CVE-2026-126063

Low 2.3No known exploitationFix available

Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer

Vendor advisory: GHSA-4p39-36wj-23h4

Record last updated

CVSS score

2.3

Low on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

None

No EPSS score available

CISA remediation deadline

None

Not in the KEV catalog

Description

### Summary Nokogiri's HTML5 serializer did not escape text inside `noscript` elements, or ` ` inside attribute values. When a document parsed with the default options is serialized, a browser with scripting enabled can parse the output into markup that Nokogiri's parser never produced. This is a mutation XSS for applications that sanitize untrusted HTML with `Nokogiri::HTML5`, allow `noscript` elements, and send the serialized output to browsers. Nokogiri 1.19.5 escapes both, as the HTML standard's serialization algorithm requires. Text inside `noscript` is still emitted unescaped for documents parsed with `parse_noscript_content_as_text: true`. Only the C extension (CRuby and TruffleRuby) is affected. JRuby does not implement `Nokogiri::HTML5`. ### Severity The Nokogiri maintainers have evaluated this as low severity (CVSS 2.3, `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`). Exploitation requires an application that allows `noscript` in sanitized HTML. Loofah and rails-html-sanitizer do not allow it by default, and Sanitize always removes it. ### Mitigation Upgrade to Nokogiri 1.19.5 or later. Applications that sanitize HTML and allow `noscript` should parse…

Weakness: CWE-79, CWE-116

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

VendorProductAffected versionsFixed inPer
Microsoftazl3 rubygem-nokogiri 1.19.4-1 on Azure Linux 3.0Not documented1.19.7-1Microsoft MSRC
Microsoftazl4 rubygem-nokogiri 1.19.4-5.azl4 on Azure Linux 4.0Not documented0:1.19.7-1.azl4Microsoft MSRC
rubygemsnokogirifrom 1.12.0 before 1.19.51.19.5GitHub Advisory Database

Timeline

  1. Advisory

    Microsoft advisory published

    Source: Microsoft MSRC (opens in a new tab)

  2. Advisory change

    Microsoft advisory revised (2.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  3. Advisory change

    Microsoft advisory revised (3.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  4. Advisory change

    Microsoft advisory revised (4.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  5. Patch

    Fix documented by Microsoft MSRC

    Source: Microsoft MSRC (opens in a new tab)

Vendor guidance and references