Bug 1473243 (CVE-2017-7540)

Summary: CVE-2017-7540 rubygem-safemode: Bypassing the whitelist of safe commands via block_pass
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: apevec, bkearney, cbillett, chrisw, cvsbot-xmlrpc, jjoyce, jmatthew, jschluet, lhh, lpeer, markmc, mburns, mmccune, ohadlevy, rbryant, sclewis, sisharma, srevivo, tdecacqu, tsanders
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 11:55:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1473795    
Bug Blocks: 1473244    

Description Adam Mariš 2017-07-20 09:56:14 UTC
A vulnerability was found in rubygem-safemode, used e.g. in Foreman. It has been found that user rendering a template (e.g. with edit_templates permission) can bypass safe mode limitations through a special ruby syntax. This can lead e.g. to deletion of objects for which the user does not have delete permissions or possibly to privilege escalation.

Upstream bug:

https://github.com/svenfuchs/safemode/pull/23

Foreman bug:

http://projects.theforeman.org/issues/20271/

Comment 1 Adam Mariš 2017-07-20 09:56:34 UTC
Acknowledgments:

Name: Tomer Brisker (Red Hat)

Comment 2 Siddharth Sharma 2017-07-20 10:22:13 UTC
Analysis:

ruby193-rubygem-safemode shipped in Red Hat Ceph Storage 1.3 is in tech preview and would be used only when installing ceph with foreman installer. Installing ceph via ceph-deploy does not use ruby193-rubygem-safemode.