CVE-2019-18197 Nokogiri affected by libxslt Use of Uninitialized Resource/Use After Free vulnerability

High 7.5 Published Updated

A use-after-free flaw in libxslt allows attackers to write out-of-bounds or disclose uninitialized memory, potentially leading to code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2019-18197?

CVE-2019-18197 is a high-severity use after free vulnerability in Canonical Ubuntu Linux, published on 18 Oct 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

In xsltCopyText in transform.c in libxslt 1.1.33, a pointer variable isn't reset under certain circumstances. If the relevant memory area happened to be freed and reused in a certain way, a bounds check could fail and memory outside a buffer could be written to, or uninitialized data could be disclosed.

Weakness: CWE-908, CWE-416

Which versions are affected by CVE-2019-18197?

2 open source packages ship an affected version, including nokogiri. It affects 3 products.

PackageAffectedFixed in
nokogiri RubyGemsAll versions1.10.5
nokogiri RubyGemsAll versions1.10.5
Linux distribution packages (17)
libxslt SUSE:Enterprise Storage 5All versions1.1.28-17.9.1
libxslt SUSE:HPE Helion OpenStack 8All versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server 12 SP2-BCLAll versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server 12 SP2-LTSSAll versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server 12 SP3-BCLAll versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server 12 SP3-LTSSAll versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server 12 SP4All versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server 12 SP5All versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server for SAP Applications 12 SP2All versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server for SAP Applications 12 SP3All versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server for SAP Applications 12 SP4All versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Software Development Kit 12 SP4All versions1.1.28-17.9.1
libxslt SUSE:Linux Enterprise Software Development Kit 12 SP5All versions1.1.28-17.9.1
libxslt SUSE:OpenStack Cloud 7All versions1.1.28-17.9.1
libxslt SUSE:OpenStack Cloud 8All versions1.1.28-17.9.1
libxslt SUSE:OpenStack Cloud Crowbar 8All versions1.1.28-17.9.1

Products include Canonical Ubuntu Linux, Debian Debian Linux, Xmlsoft Libxslt.

How do I fix CVE-2019-18197?

Upgrade nokogiri to 1.10.5 or later.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2019-18197 being exploited?

There is no known exploitation of CVE-2019-18197 in the wild and no public exploit code.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2019-18197, DEBIAN-CVE-2019-18197, DLA-1973-1, GHSA-242x-7cm6-4w8j, JLSEC-2026-580, SUSE-SU-2020:0920-1 and 2 more.

Is CVE-2019-18197 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free