Executive brief
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.
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
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
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15069
- https://gitlab.gnome.org/GNOME/libxslt/commit/6ce8de69330783977dd14f6569419489875fb71b
- https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b@%3Cissues.bookkeeper.apache.org%3E
- https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4@%3Cissues.bookkeeper.apache.org%3E
- https://lists.debian.org/debian-lts-announce/2019/07/msg00020.html