CVE-2017-7540
rubygem-safemode: Bypassing the whitelist of safe commands via block_pass
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, GHSA, Ruby Advisory DB. Rated lower by Red Hat (high).
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.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| rubygems::GitHub Security Advisory RubyGems | safemode | 1.3.2 |
| rubygems::Ruby Advisory Database | safemode | >= 1.3.3 |
References
- https://access.redhat.com/security/cve/CVE-2017-7540
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/safemode/CVE-2017-7540.yml
- https://github.com/svenfuchs/safemode
- https://github.com/svenfuchs/safemode/pull/23
- https://nvd.nist.gov/vuln/detail/CVE-2017-7540
- https://www.cve.org/CVERecord?id=CVE-2017-7540