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.
Severity (CVSS)
| Base score | 2 |
|---|---|
| Severity | Low |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-416 — CWE-416: Use After Free
Affected products
| Vendor | Product | Versions |
|---|---|---|
| sparklemotion | nokogiri | < 1.19.5 [affected] |
References
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w (x_refsource_CONFIRM)
- https://github.com/sparklemotion/nokogiri/pull/3752 (x_refsource_MISC)
- https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425 (x_refsource_MISC)
- https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f (x_refsource_MISC)
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5 (x_refsource_MISC)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 11 Nov 2026 08:04 UTC.