Unchecked Return Value Affecting nokogiri package, versions >=1.13.8, <1.13.10


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

EPSS
0.12% (48th 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-3164751
  • published8 Dec 2022
  • disclosed8 Dec 2022
  • creditDavid Wilemski

Introduced: 8 Dec 2022

CVE-2022-23476  (opens in a new tab)
CWE-252  (opens in a new tab)

How to fix?

Upgrade nokogiri to version 1.13.10 or higher.

Overview

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

Affected versions of this package are vulnerable to Unchecked Return Value due to failing to check the return value from xmlTextReaderExpand in the method Nokogiri::XML::Reader#attribute_hash. Exploiting this vulnerability can lead to a null pointer exception when parsing invalid markup.

Mitigation

Users may be able to search their code for calls to either XML::Reader#attributes or XML::Reader#attribute_hash to determine if they are affected.

CVSS Scores

version 3.1