Use After Free Affecting nokogiri package, versions <1.18.3


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
1.13% (63rd 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 IDSNYK-RUBY-NOKOGIRI-8732779
  • published19 Feb 2025
  • disclosed18 Feb 2025
  • creditUnknown

Introduced: 18 Feb 2025

CVE-2024-56171  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade nokogiri to version 1.18.3 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 in the xmlSchemaItemListAdd() function in xmlschemas.c, which is exploitable by supplying a malicious .xsd schema for validation. it may also be exploitable when an xsd:keyref is provided in combination with recursively defined types that have additional identity constraints, for validation against a non malicious schema.

CVSS Base Scores

version 4.0
version 3.1