Expired Pointer Dereference Affecting nokogiri package, versions [,1.19.4)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.46% (38th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Expired Pointer Dereference vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-NOKOGIRI-17391926
  • published21 Jun 2026
  • disclosed19 Jun 2026
  • creditZheng Yu

Introduced: 19 Jun 2026

CVE-2026-57435  (opens in a new tab)
CWE-416  (opens in a new tab)
CWE-825  (opens in a new tab)

How to fix?

Upgrade nokogiri to version 1.19.4 or higher.

Overview

Affected versions of this package are vulnerable to Expired Pointer Dereference when replacing an XML attribute's value via value= or content= after previously accessing the attribute's child node. An attacker can cause invalid memory access or application crashes by manipulating attribute values and child nodes in a specific sequence.

Note: This is only exploitable if the application directly accesses an attribute's child node and then mutates the same attribute's value without intervening safeguards.

Workaround

This vulnerability can be mitigated by avoiding direct access to attribute child nodes before mutating the same attribute's value.

CVSS Base Scores

version 4.0
version 3.1