CVE-2017-7540 Safemode Gem Has Incomplete List of Disallowed Inputs

Critical 9.8 Published Updated

Attackers can bypass Ruby safe mode restrictions to delete unauthorized objects or escalate privileges in applications using the safemode gem.

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-7540?

CVE-2017-7540 is a critical vulnerability in Red Hat, Inc. rubygem-safemode, published on 21 Jul 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

rubygem-safemode, as used in Foreman, versions 1.3.2 and earlier are vulnerable to bypassing safe mode limitations via special Ruby syntax. This can lead to deletion of objects for which the user does not have delete permissions or possibly to privilege escalation.

Weakness: CWE-184

Which versions are affected by CVE-2017-7540?

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

PackageAffectedFixed in
safemode RubyGemsAll versions1.3.2
safemode RubyGemsAll versions1.3.2

Products include Safemode Project Safemode.

How do I fix CVE-2017-7540?

Upgrade safemode to 1.3.2 or later.

Is CVE-2017-7540 being exploited?

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

Sources

Also known as GHSA-5vx5-9q73-wgp4.

Is CVE-2017-7540 in your software?

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

Check your SBOMs for free