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


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.02% (3rd 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-10674188
  • published10 Jul 2025
  • disclosed16 Jun 2025
  • creditAhmed Lekssays

Introduced: 16 Jun 2025

CVE-2025-6170  (opens in a new tab)
CWE-121  (opens in a new tab)

How to fix?

Upgrade nokogiri to version 1.18.9 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 due to unsafe use of strcpy() in the xmllint interactive shell command tool. An attacker can cause a crash by providing an overly long argument to any shell command during an interactive session.

Note:

This vulnerability affects only the interactive shell and requires that an attacker can influence or control the command input to xmllint, which is uncommon in typical deployments.

CVSS Base Scores

version 4.0
version 3.1