CVE-2017-0901 RubyGems may allow a maliciously crafted gem to overwrite files

High 7.5 Published Updated

Attackers can overwrite arbitrary files via malicious gem specification names, potentially leading to code execution or system compromise.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-0901?

CVE-2017-0901 is a high-severity path traversal vulnerability in Canonical Ubuntu Linux, published on 31 Aug 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

RubyGems version 2.6.12 and earlier fails to validate specification names, allowing a maliciously crafted gem to potentially overwrite any file on the filesystem.

Weakness: CWE-20, CWE-22

Which versions are affected by CVE-2017-0901?

2 open source packages ship an affected version, including rubygems-update. It affects 9 products.

PackageAffectedFixed in
rubygems-update RubyGemsAll versions2.6.13
rubygems-update RubyGemsAll versions2.6.13

Products include Canonical Ubuntu Linux, Debian Debian Linux, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Server, Redhat Enterprise Linux Server Aus, Redhat Enterprise Linux Server Eus and 3 more.

How do I fix CVE-2017-0901?

Upgrade rubygems-update to 2.6.13 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2017-0901 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2017-0901 exists.

Public exploit code: 1 Exploit-DB entry.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2017-0901, CLEANSTART-2026-HJ73533, DEBIAN-CVE-2017-0901, GHSA-pm9x-4392-2c2p, UBUNTU-CVE-2017-0901.

Is CVE-2017-0901 in your software?

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

Check your SBOMs for free