Skip to main content

Nokogiri CVE-2025-71406

| EUVDEUVD-2025-210773 HIGH
Use After Free (CWE-416)
2026-08-25 VulnCheck GHSA-7jxm-3c74-9v37
8.7
CVSS 4.0 · Vendor: VulnCheck
Share

Severity by source

Vendor (VulnCheck) PRIMARY
8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
8.9 HIGH

AV:N reflects Nokogiri's predominant use in web apps processing external XSLT; AC:H captures use-after-free heap-layout complexity; S:C and I:H/A:H align with upstream libxslt ratings.

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

4
Patch available
Aug 25, 2026 - 17:17 EUVD
Source Code Evidence Fetched
Aug 25, 2026 - 16:01 vuln.today
Analysis Generated
Aug 25, 2026 - 16:01 vuln.today
CVE Published
Aug 25, 2026 - 15:15 cve.org
HIGH 8.7

DescriptionCVE.org

Nokogiri before 1.18.4 bundles a vulnerable version of libxslt (prior to 1.1.43) that contains two use-after-free vulnerabilities: CVE-2025-24855 (use-after-free of the XPath context node due to xsltEvalXPathStringNs leaking xpathCtxt->node) and CVE-2024-55549 (use-after-free related to excluded result prefixes/namespaces). Processing crafted XSLT can trigger memory corruption. Nokogiri 1.18.4 upgrades the bundled libxslt to 1.1.43 to resolve these issues.

AnalysisAI

Use-after-free memory corruption in Nokogiri before 1.18.4 exposes Ruby applications to potential heap corruption and process compromise when processing attacker-supplied XSLT stylesheets. The root cause is Nokogiri's bundled libxslt dependency (prior to v1.1.43), which contains two distinct UAF bugs: CVE-2025-24855 (XPath context node leaked by xsltEvalXPathStringNs) and CVE-2024-55549 (namespace prefix handling corruption). No public exploit code has been identified at time of analysis, and CISA KEV listing is absent; a vendor-released patch (Nokogiri 1.18.4) is available.

Technical ContextAI

Nokogiri is a Ruby gem for parsing HTML and XML that ships a statically bundled copy of libxslt, the GNOME XSLT processing library, rather than relying on the system-provided version. This bundling strategy means Nokogiri carries its own libxslt vulnerability surface independent of OS package updates. The two underlying flaws are classic CWE-416 (Use After Free) defects in libxslt's XSLT evaluation engine: CVE-2025-24855 occurs because xsltEvalXPathStringNs leaks a reference to xpathCtxt->node, allowing it to be freed while still reachable; CVE-2024-55549 corrupts memory in the excluded result prefixes/namespaces code path. Both are triggered by parsing crafted XSLT stylesheets. Affected product is identified via CPE cpe:2.3:a:sparklemotion:nokogiri:*:*:*:*:*:*:*:*, covering all Nokogiri versions prior to 1.18.4 across all platforms.

RemediationAI

Upgrade Nokogiri to version 1.18.4 or later; this is the vendor-confirmed fix (https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-mrxw-mxhj-p664) and upgrades the bundled libxslt to v1.1.43. In most Ruby/Bundler projects this is accomplished with 'bundle update nokogiri' followed by pinning '~> 1.18.4' in the Gemfile. If an immediate upgrade is not possible, a compensating control is to disable or gate any application pathway that accepts XSLT stylesheets from untrusted sources - rejecting externally supplied XSLT at the application boundary eliminates the attack surface without requiring a gem update, though this may break intended functionality for applications that rely on user-supplied transforms. Applications using a system-provided libxslt rather than Nokogiri's bundled copy should verify the system libxslt is at v1.1.43 or newer; if it is, the exposure from this specific vector is mitigated at the OS level.

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-2025-71407 CRITICAL
9.3 Aug 25

Memory-corruption denial of service (and potential code execution) affects the Ruby Nokogiri gem before 1.18.3, which bu

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-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-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-79772 MEDIUM
6.9 Aug 25

Unchecked return value in Nokogiri's CRuby extension (versions 1.5.1 through 1.19.0) causes the `canonicalize` method to

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

Share

CVE-2025-71406 vulnerability details – vuln.today

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