Stack-based Buffer Overflow Affecting nokogiri package, versions <1.18.3


Severity

Recommended
0.0
high
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 IDSNYK-RUBY-NOKOGIRI-8732769
  • published19 Feb 2025
  • disclosed18 Feb 2025
  • creditUnknown

Introduced: 18 Feb 2025

NewCVE-2025-24928  (opens in a new tab)
CWE-121  (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 Stack-based Buffer Overflow in the xmlSnprintfElements() function. An attacker can overwrite out-of-bounds stack memory with XML NCName data by supplying a malicious XML document or malicious DTD.

This vulnerability is similar to the previously reported and patched (CVE-2017-9047)[https://security.snyk.io/vuln/SNYK-UNMANAGED-LIBXML2-3004044].

CVSS Scores

version 4.0
version 3.1