CVE-2017-18258 Uncontrolled resource consumption in nokogiri

Medium 6.5 Published Updated

Remote attackers can cause denial of service via memory consumption in libxml2 by submitting crafted LZMA files.

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-2017-18258?

CVE-2017-18258 is a medium-severity denial of service vulnerability in Xmlsoft Libxml2, published on 8 Apr 2018. 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

The xz_head function in xzlib.c in libxml2 before 2.9.6 allows remote attackers to cause a denial of service (memory consumption) via a crafted LZMA file, because the decoder functionality does not restrict memory usage to what is required for a legitimate file.

Weakness: CWE-770

Which versions are affected by CVE-2017-18258?

2 open source packages ship an affected version, including nokogiri. It affects 1 product.

PackageAffectedFixed in
nokogiri RubyGemsAll versions1.8.2
nokogiri RubyGemsAll versions1.8.2

Products include Xmlsoft Libxml2.

How do I fix CVE-2017-18258?

Upgrade nokogiri to 1.8.2 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2017-18258 being exploited?

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

All Xmlsoft Libxml2 vulnerabilities

Sources

Also known as DEBIAN-CVE-2017-18258, ECHO-3a2b-e3e4-77ce, GHSA-882p-jqgm-f45g, UBUNTU-CVE-2017-18258.

Is CVE-2017-18258 in your software?

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

Check your SBOMs for free