Skip to main content

Nokogiri EUVDEUVD-2026-65530

| CVE-2026-79772 MEDIUM
Unchecked Return Value (CWE-252)
2026-08-25 VulnCheck GHSA-xqqh-3w52-q8p7
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Ruby app with SAML SSO enabled
  2. Delivery
    Craft SAML response with malformed canonicalized XML
  3. Exploit
    Submit to SAML assertion endpoint
  4. Execution
    Nokogiri canonicalize silently returns empty string
  5. Persist
    Downstream SAML library accepts invalid signature
  6. Impact
    Authenticate as arbitrary user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Return value checking
Exploitation Conditions

Exploitation requires all of the following: the target application must use the CRuby (MRI) implementation of Nokogiri, not JRuby; Nokogiri must be at version 1.5.1 or later but below 1.19.1; the application or a downstream library (such as a SAML toolkit) must invoke Nokogiri::XML::Document#canonicalize or Nokogiri::XML::Node#canonicalize as part of XML signature or SAML assertion verification; and the downstream library must not independently validate that the canonicalized output is non-empty before using it. The CVSS 4.0 vector (PR:N, AC:L, AT:N) reflects that no attacker authentication or special complexity is required once these conditions are met. Applications that use Nokogiri exclusively for HTML/XML parsing and never call canonicalize in a signature verification path are not exposed regardless of version.

Impact

The CVSS 4.0 score of 6.9 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N) captures only Nokogiri's direct impact - a method returning incorrect data - and materially understates the real-world consequence in SAML-dependent deployments. The downstream authentication bypass is the primary risk vector: any Ruby application using SAML SSO that routes signature verification through Nokogiri's canonicalize method is potentially vulnerable to unauthenticated account takeover. Nokogiri's own maintainers rated this Medium, correctly noting that the library lacks a direct security boundary around canonicalization; however, the demonstrated SAML bypass makes this a priority patch for any Rails/Ruby environment with SSO. EPSS data is absent from available input, preventing probabilistic exploitation forecasting. No CISA KEV listing exists, and no public exploit code has been identified, distinguishing this from mass-exploitation scenarios. The real-world risk is best characterized as moderate-to-high for SAML-enabled applications and negligible for applications not invoking canonicalize in a signature verification context.

Exploit ScenarioDerived

An attacker targeting a Rails application using SAML SSO (e.g., via OmniAuth-SAML or ruby-saml) submits a crafted SAML response whose signed canonicalized XML is deliberately malformed. Nokogiri's CRuby canonicalize method fails silently and returns an empty string; the SAML library receives this as the canonicalized form, causing signature verification to succeed on attacker-controlled content. The attacker authenticates as any user - including administrators - without valid credentials. No public exploit code has been confirmed, but the technique was validated by HackerOne researcher d4d.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 25, 2026

Unchecked return value in Nokogiri's CRuby extension (versions 1.5.1 through 1.19.0) causes the canonicalize method to silently return an empty string on XML canonicalization failure instead of raising an exception. This silent failure propagates incorrectly to downstream SAML libraries, which have been demonstrated in practice to accept the malformed output as a valid canonicalized document, enabling signature validation bypass. The JRuby implementation is not affected; exploitation has been confirmed as demonstrated by a HackerOne researcher but is not listed in CISA KEV.

RemediationAI

Upgrade Nokogiri to version 1.19.1 or later, the vendor-released patch confirmed by the GHSA-wx95-c6cv-8532 advisory at https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wx95-c6cv-8532. Update your Gemfile with gem 'nokogiri', '>= 1.19.1' and run bundle update nokogiri. Applications using JRuby require no action. If immediate upgrade is not feasible, add an explicit guard in application code that rejects empty or unexpectedly short strings returned by canonicalize before passing them to any signature verification logic - this prevents silent failure propagation but adds application-layer fragility. Do not rely on SAML library updates alone to close this gap, as the root cause is in Nokogiri's return value handling.

Affected VersionsENISA

nokogiri 1.5.1 <1.19.1

Affected Packages

rubygems nokogiri fix: 1.19.1

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 widely-used Ruby HTML/XML parsing library that wraps libxml2 via a CRuby native C extension. The vulnerability arises in the Nokogiri::XML::Document#canonicalize and Nokogiri::XML::Node#canonicalize methods, which call xmlC14NExecute from libxml2. This libxml2 function returns -1 on failure, but the CRuby extension ignores this return code (CWE-252: Unchecked Return Value) and returns an empty Ruby string instead of raising a RuntimeError. XML Canonicalization (C14N) is a required preprocessing step in XML digital signature verification (XML-DSig), which underpins SAML 2.0 authentication. When a downstream SAML library passes the empty-string output to its signature verifier without detecting the failure, the verifier operates on incorrect data, making it possible to forge or manipulate signed SAML assertions. The JRuby implementation wraps Java's XML stack, which correctly raises RuntimeError on failure; JRuby users are explicitly not affected. Affected CPE: cpe:2.3:a:sparklemotion:nokogiri:*:*:*:*:*:*:*:*.

Know when Nokogiri gets its next vulnerability

  • 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

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 8.7 HIGH

AC:H for required SAML deployment context; S:C and C:H/I:H reflect downstream authentication bypass enabling full account takeover.

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:H/SI:H/SA:N
SUSE 6.8 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Red Hat 5.3 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 25, 2026 - 17:17 EUVD
CVE Published
Aug 25, 2026 - 15:16 cve.org
MEDIUM 6.9

DescriptionCVE.org

Nokogiri versions before 1.19.1 fail to check the return value from xmlC14NExecute in the canonicalize method, returning an empty string on failure instead of raising an exception. Attackers can exploit this to bypass signature validation in downstream SAML libraries by providing invalid canonicalized XML that is incorrectly accepted as valid.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
High
most downloaded Ruby gem, ubiquitous in Rails and Ruby web applications
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
High

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2022-29181 HIGH POC
8.2 May 20

Nokogiri is an open source XML and HTML library for Ruby. Rated high severity (CVSS 8.2), this vulnerability is remotely

CVE-2019-5477 CRITICAL
9.8 Aug 16

A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via Rub

CVE-2026-79770 HIGH
8.7 Aug 25

Denial-of-service in Nokogiri before 1.19.3 stems from three distinct ReDoS vulnerabilities in the CSS selector tokenize

CVE-2026-79769 HIGH
8.7 Aug 25

Out-of-bounds memory read in Nokogiri (CRuby) versions before 1.19.4 crashes the host Ruby process when application code

CVE-2025-71346 HIGH
8.7 Aug 25

Heap-based buffer under-read in libxml2's XML Schema identity constraint processor affects all Nokogiri releases prior t

CVE-2022-23476 HIGH
7.5 Dec 08

Nokogiri is an open source XML and HTML library for the Ruby programming language. Rated high severity (CVSS 7.5), this

CVE-2022-24836 HIGH
7.5 Apr 11

Nokogiri is an open source XML and HTML library for Ruby. Rated high severity (CVSS 7.5), this vulnerability is remotely

CVE-2021-41098 HIGH
7.5 Sep 27

Nokogiri is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support. Rated high sever

CVE-2026-79771 MEDIUM
6.9 Aug 25

Heap memory leaks in Nokogiri's XSLT transform method (versions before 1.19.3) enable gradual denial of service against

CVE-2026-57235 MEDIUM
6.3 Jun 25

Out-of-bounds read in Nokogiri's `NodeSet#[]` method (all versions before 1.19.4) enables an attacker who can supply a l

CVE-2020-26247 MEDIUM
4.3 Dec 30

Nokogiri is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support. Rated medium sev

CVE-2026-57234 LOW
2.6 Jun 25

NONET network restriction bypass in Nokogiri's JRuby implementation permits external resource fetching during XML Schema

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 16.0 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy