CVE-2019-13118: Nokogiri libxslt type confusion in xsl:number instruction

CVE-2019-13118 · Severity: high · CVSS 7.5 · Published 2022-05-24

Nokogiri, a popular Ruby library for processing XML and HTML, was found to be using a vulnerable version of the libxslt library. This flaw allows an attacker to potentially read sensitive information from the application's memory by providing specially crafted formatting instructions. This could lead to the exposure of internal data or help an attacker bypass other security protections.

Technologies: Gnome Libxslt, nokogiri (RubyGems). Vendors: Gnome, RubyGems.

Quick answers

Is CVE-2019-13118 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2019-13118 being exploited in the wild.
How severe is CVE-2019-13118?
High severity, with a CVSS score of 7.5, published 24 May 2022.
Which products and versions are affected?
Gnome Libxslt 1.1.33; nokogiri (RubyGems) < 1.10.5, ECOSYSTEM:introduced=0,fixed=1.10.5.
Is there a fix for CVE-2019-13118?
Yes. nokogiri (RubyGems): upgrade to 1.10.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2019-13118 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2019-13118?
Check whether you run Gnome Libxslt or nokogiri (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • nokogiri (RubyGems): upgrade to 1.10.5 or later
    bundle update nokogiri

Technical details

A type confusion vulnerability exists in libxslt 1.1.33 within the `numbers.c` component. The root cause is a variable type holding grouping characters for the `xsl:number` instruction being too narrow, which allows an invalid character/length combination to be passed to `xsltNumberFormatDecimal`. This results in a read of uninitialized stack data. An attacker can exploit this over the network without authentication or user interaction by providing a malicious XSLT stylesheet or XML document. Nokogiri addressed this by updating its bundled libxslt to version 1.1.34 in release 1.10.5.

Affected products

  • Nokogiri Nokogiri < 1.10.5
  • GNOME libxslt 1.1.33

Identifiers

  • CVE-2019-13118
  • GHSA-cf46-6xxh-pc75

Timeline

  • 2019-07-01: advisory: NVD published CVE-2019-13118
  • 2019-10-16: patched: Nokogiri version 1.10.5 released
  • 2022-05-24: advisory: GitHub Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.