Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRun code in CRuby Nokogiri context
-
ExploitAccess attribute child nodes then replace attribute value
-
ImpactReuse freed child wrapper causing invalid read/segfault
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the CRuby native extension (JRuby is explicitly not affected) and a specific application-side API-usage pattern: Ruby code must first directly access an existing attribute's child nodes (e.g. Attr#children) and then replace that same attribute's value via Nokogiri::XML::Node#[]= or Node#lang=, after which the already-wrapped child node is reused. The maintainers state this pattern does not arise during normal use. Limiting factors: local vector (AV:L), high attack complexity with a present attack requirement (AC:H/AT:P), and required privileges (PR:L) meaning the attacker must be able to influence the executing Ruby code; impact is confined to a possible crash. Versions before 1.19.5 are vulnerable; the only complete fix stated by the vendor is upgrading to Nokogiri 1.19.5 or later, with a documented workaround of avoiding direct access to attribute child nodes before replacing the same attribute's value. |
| Impact | This is a genuinely low-priority issue, and every independent signal agrees. The vendor CVSS 4.0 vector (CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L) scores 2.0: local attack vector, high complexity, a present attack requirement, required privileges, and impact limited to low availability with no confidentiality or integrity impact. SSVC reinforces this (Exploitation: none, Automatable: no, Technical Impact: partial), the vuln.today Decision label is 'monitor', and there is no CISA KEV listing and no public exploit identified at time of analysis. EPSS was not supplied, but given a local, config/usage-dependent, low-impact memory bug, a low probability is consistent with the other signals rather than conflicting with them. The practical ceiling is an invalid read causing a possible segfault (a crash/DoS), not code execution or data theft - note the vector sets VC:N, so despite the 'Information Disclosure' tag the maintainers did not assess any confidentiality impact. No key signals conflict; the main caveat is the absent EPSS value, which does not change the conclusion. |
| Exploit ScenarioDerived | An attacker would need the target Ruby application to execute a specific and unusual Nokogiri API sequence under CRuby: first directly access an XML attribute's child nodes (e.g. via Attr#children), then replace that same attribute's value through Node#[]= or Node#lang=, and then reuse the now-freed child node wrapper. Because this requires AV:L/AC:H with a present attack requirement (AT:P) and local privileges (PR:L), it is not remotely triggerable in normal use and realistically arises only in application code that already follows this pattern. No public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 11, 2026
A use-after-free in Nokogiri's CRuby native extension can leave a Ruby wrapper referencing freed memory when an existing XML attribute's value is replaced through Nokogiri::XML::Node#[]= or Node#lang= after the application has already accessed that attribute's child nodes; a subsequent use of the stale child node can trigger an invalid read and possible segfault. Only CRuby builds before 1.19.5 are affected - JRuby is explicitly unaffected - and the maintainers rate this low severity because the required API sequence (direct attribute-child access followed by replacement of the same attribute's value) does not occur in normal use. The trigger is application-side rather than attacker-driven from outside, the vector is local with high complexity and required privileges, impact is limited to availability (a crash), no public exploit has been identified at time of analysis, and the vendor has released a fix.
RemediationAI
Vendor-released patch: upgrade to Nokogiri 1.19.5 or later, which is the only complete fix the maintainers state, available at https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5 (bundler: pin gem "nokogiri", ">= 1.19.5" and refresh the lockfile). The fix was landed via https://github.com/sparklemotion/nokogiri/pull/3752 (commits b15b518db9fd15fd6b046f73d1439c282e5cc425 and feaed3c8c9bd9d81d064d4ca09b16044cd705d6f) and preserves already-wrapped attribute child nodes before an attribute value is replaced, with no public API change, so upgrading carries no expected code changes. Where an immediate upgrade is not possible, the vendor documents one workaround: avoid accessing attribute child nodes directly via Attr#children or similar before replacing that same attribute's value through Node#[]= or Node#lang= - the trade-off is that this requires auditing and constraining application or library code that walks attribute children, and reordering attribute reads/writes, which may not be feasible for third-party gems. Because this is the same issue class as GHSA-phwj-rprq-35pp fixed in 1.19.4, teams should move to 1.19.5 rather than 1.19.4 to close both variants; given the local, high-complexity, crash-only profile and no observed exploitation, no other compensating control is indicated by the available sources.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in rubygems
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Nokogiri is a Ruby XML/HTML parsing library that binds libxml2 through a C native extension on CRuby, wrapping native libxml2 nodes in Ruby objects; attribute values in libxml2 are represented as attribute nodes with child text nodes. This is a CWE-416 use-after-free: when Node#[]= or Node#lang= replaces an existing attribute's value, the underlying native child nodes are freed, but if Ruby code previously obtained wrappers for those children (for example via Attr#children) the wrappers remain reachable and dereference freed memory, producing an invalid read and potential segfault. The flaw is the same class as GHSA-phwj-rprq-35pp, which was fixed for Attr#value= in Nokogiri 1.19.4; the 1.19.5 fix (PR #3752, commits b15b518 and feaed3c) preserves all already-wrapped attribute child nodes before replacing the attribute value, with no public API change. The affected package is pkg:rubygems/nokogiri, i.e. the CRuby gem builds; the JRuby implementation is not affected.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Triggerable only via local Ruby code running an unusual API sequence (AV:L/PR:L), the required child-access-then-replace ordering makes it high complexity (AC:H), and impact is limited to a possible crash (A:L, C:N/I:N).
Primary rating from Vendor (https://github.com/sparklemotion/nokogiri).
CVSS VectorVendor: https://github.com/sparklemotion/nokogiri
DescriptionCVE.org
Summary
Nokogiri's CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an existing XML attribute via Nokogiri::XML::Node#[]= or Nokogiri::XML::Node#lang=. If Ruby code had already accessed the attribute's child nodes, replacing the value could free those native child nodes while their wrappers remained reachable. Using one of those child nodes afterwards could cause an invalid read and a possible segfault.
This is the same class of issue as GHSA-phwj-rprq-35pp, which was fixed for Attr#value= in Nokogiri 1.19.4.
Nokogiri 1.19.5 preserves all already-wrapped attribute child nodes before replacing the attribute value.
JRuby is not affected.
Severity
The Nokogiri maintainers have evaluated this as low severity. Reaching it requires an unusual API-usage pattern that does not arise during normal use. The application must directly access an attribute's child nodes and then replace that same attribute's value via Node#[]= or Node#lang=. Nokogiri 1.19.5 makes this pattern safe with no change to the public API.
Mitigation
Upgrade to Nokogiri 1.19.5 or later.
As a workaround, avoid accessing attribute child nodes directly via Attr#children or similar before replacing the same attribute's value.
Credit
This issue was responsibly reported by zx (@manus-pi).
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-122836
GHSA-3w22-6jfg-527w
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB