Skip to content
OpenAdvisories
Low · 2.0 CVE-2026-126064 EUVD-2026-122836GHSA-3w22-6jfg-527w

Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Node#[]=` or `#lang=`

Published Nov 10, 2026 · Updated Nov 10, 2026 · Assigned by GitHub_M

Description

Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.5, the CRuby native extension can leave Ruby wrappers pointing to freed memory when Nokogiri::XML::Node#[]= or Nokogiri::XML::Node#lang= replaces an existing attribute value after code has accessed the attribute's child nodes. Replacing the value frees native child nodes while their wrappers remain reachable, and later use of those wrappers can cause an invalid read or process segfault. JRuby is not affected. This issue is fixed in version 1.19.5.

Affected products

VendorProductAffectedFixed
sparklemotion nokogiri < 1.19.5 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ruby-nokogiri No fix yet —
Debian 13 ruby-nokogiri No fix yet —
Debian 12 ruby-nokogiri No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 ruby-nokogiri No fix yet —
Ubuntu 26.04 LTS ruby-nokogiri No fix yet —
Ubuntu 24.04 LTS ruby-nokogiri No fix yet —
Ubuntu 18.04 LTS ruby-nokogiri No fix yet —
Ubuntu 16.04 LTS ruby-nokogiri No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS ruby-nokogiri No fix yet —
Ubuntu Pro 20.04 LTS ruby-nokogiri No fix yet —
Ubuntu Pro 14.04 LTS ruby-nokogiri No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 rubygem-nokogiri No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling logstash-9.3 +2 No fix yet —
Wolfi rolling logstash-9.4 +1 9.4.9-r1 —

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems nokogiri < 1.19.5 1.19.5 GHSA-3w22-6jfg-527w

References