CVE-2026-57434 Nokogiri NULL Pointer Dereference DoS Vulnerability
Nokogiri, a widely-used Ruby library for parsing and manipulating XML and HTML documents, contains a flaw in how it initializes certain internal objects. When specific methods are called on these improperly initialized objects, the library crashes due to a null pointer error. This affects Nokogiri versions before 1.19.4. While the crash itself denies availability, it does not allow attackers to steal data or execute arbitrary code.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-476
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-06-26
NVD description (verbatim)
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri contains a bug when calling certain methods on allocated-but-uninitialized native wrapper classes that inherit from Nokogiri::XML::Node. This caused a NULL pointer dereference that could crash the process. This vulnerability is fixed in 1.19.4.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-57434 is a NULL pointer dereference vulnerability (CWE-476) in Nokogiri's native wrapper class hierarchy. The bug occurs in allocated-but-uninitialized native wrapper classes that inherit from Nokogiri::XML::Node. Calling certain methods on these objects triggers a dereference of a null pointer, causing process termination. The vulnerability exists in versions prior to 1.19.4 and requires no authentication or user interaction to trigger—a remote attacker can craft input that causes the vulnerable code path to execute.
Business impact
This vulnerability enables denial-of-service attacks against any Ruby application using Nokogiri to process untrusted XML or HTML input. Web services, API gateways, document processors, and automated data pipelines are at risk. An attacker can repeatedly crash affected services, disrupting availability and potentially triggering cascading failures in dependent systems. Organizations relying on Nokogiri for critical document handling should assess their exposure and prioritize remediation.
Affected systems
Nokogiri versions prior to 1.19.4 are vulnerable. Any Ruby application that imports and uses Nokogiri is potentially affected, particularly those that parse XML or HTML from external or untrusted sources. This includes web frameworks, API servers, content management systems, and batch processing jobs. Organizations should inventory Ruby applications in their environment and determine which ones depend on vulnerable Nokogiri versions.
Exploitability
The vulnerability is highly exploitable. It requires no authentication, no special privileges, and no user interaction. An attacker need only send malformed or specially crafted XML/HTML input to a vulnerable application to trigger the crash. The CVSS vector (AV:N/AC:L/PR:N/UI:N) reflects network accessibility with low attack complexity. However, actual exploitation depends on the application exposing Nokogiri's parsing functionality to untrusted input; internal-only document processing is lower risk.
Remediation
Upgrade Nokogiri to version 1.19.4 or later. This fix addresses the null pointer dereference by properly initializing native wrapper objects. Organizations should coordinate Ruby dependency updates through their normal change management process, test affected applications in staging environments, and deploy updates to production systematically.
Patch guidance
Update the Nokogiri gem to 1.19.4 or higher. In Ruby projects using Bundler, update your Gemfile to specify `gem 'nokogiri', '>= 1.19.4'` and run `bundle update nokogiri`. Applications using other dependency managers (e.g., rvm, rbenv) should verify their Ruby environment and re-lock dependencies. Test parsing functionality with both valid and edge-case XML/HTML inputs after updating to confirm normal operation.
Detection guidance
Monitor application logs for segmentation faults (SIGSEGV) or process crash events coinciding with XML/HTML parsing operations. Check gem dependencies using `bundle list` or `gem list nokogiri` to identify installed versions. Implement input validation and sanitization on XML/HTML received from untrusted sources to reduce attack surface while patches are deployed. Application performance monitoring (APM) tools can track sudden process terminations and help correlate them with input patterns.
Why prioritize this
This vulnerability merits high priority due to its network-exploitable, unauthenticated nature and the widespread use of Nokogiri in Ruby ecosystems. The denial-of-service impact is severe for availability-sensitive applications. Although it does not enable data theft or code execution, the ease of exploitation and low barrier to attack make it a straightforward target for adversaries seeking to disrupt services. Organizations with public-facing or internet-connected Ruby services should prioritize patching.
Risk score, explained
The CVSS 3.1 score of 7.5 (HIGH) reflects a network-accessible denial-of-service vulnerability with no authentication or user interaction required. The attack complexity is low, meaning a standard crafted input reliably triggers the crash. The impact is limited to availability (no confidentiality or integrity breach), but availability loss is significant for production services. The score appropriately weights the ease of exploitation against the severity of impact.
Frequently asked questions
Does this vulnerability allow remote code execution or data theft?
No. This is strictly a denial-of-service vulnerability caused by a null pointer dereference. It crashes the process but does not permit attackers to execute arbitrary code, read sensitive data, or modify files. The impact is limited to service unavailability.
Which Ruby applications are at risk?
Any Ruby application using Nokogiri versions before 1.19.4 to parse XML or HTML is at risk if that input comes from an untrusted or external source. Applications that only parse internally controlled, well-formed documents face lower risk. Web applications, API servers, and automated parsers are common targets.
How do I know which Nokogiri version I'm running?
Run `gem list nokogiri` in your Ruby environment or check your Gemfile.lock file. You can also require Nokogiri in a Ruby console and call `puts Nokogiri::VERSION`. If you see a version number lower than 1.19.4, your application is vulnerable.
Can I work around this vulnerability without upgrading?
Yes, as a temporary measure, you can restrict the XML/HTML input your application accepts—validating structure, limiting entity expansion, and rejecting malformed content reduces the likelihood of triggering the code path. However, upgrading is the only reliable fix and should be prioritized.
This analysis is based on official CVE data and vendor advisories as of the publication date. Exploit information and proof-of-concept details are not provided. Organizations should verify patch availability and compatibility with their specific Ruby environment before deployment. SEC.co does not provide legal advice; consult your security and compliance teams regarding breach notification and regulatory reporting obligations if exploitation is suspected. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-55657HIGHGPAC MP4Box NULL Pointer Dereference Denial of Service
- CVE-2025-59604HIGHQualcomm Snapdragon Memory Corruption Vulnerability – HIGH Severity
- CVE-2025-59606HIGHQualcomm Chipset Memory Corruption Local Privilege Escalation
- CVE-2025-62850HIGHQNAP QuTS hero NULL Pointer Dereference DoS Vulnerability
- CVE-2025-66281HIGHQNAP NULL Pointer Dereference DoS Vulnerability (HIGH)
- CVE-2025-70099HIGHNULL Pointer Dereference in lwext4 Directory Parsing (Denial of Service)
- CVE-2026-0156HIGHAndroid RTP Memory Safety Vulnerability—Denial of Service Risk
- CVE-2026-24716HIGHQNAP NULL Pointer Dereference DoS Vulnerability – Patch Guidance