Use After Free Affecting nokogiri package, versions <1.18.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

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 Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-NOKOGIRI-9510789
  • published23 Mar 2025
  • disclosed14 Mar 2025
  • creditUnknown

Introduced: 14 Mar 2025

NewCVE-2025-24855  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade nokogiri to version 1.18.4 or higher.

Overview

nokogiri is a gem for parsing HTML, XML, SAX, and Reader.

Affected versions of this package are vulnerable to Use After Free through the numbers.c component. An attacker can cause memory corruption or execute arbitrary code by exploiting nested XPath evaluations where an XPath context node is modified but not restored.

CVSS Base Scores

version 4.0
version 3.1