Bug 1547419 (CVE-2018-1000074)

Summary: CVE-2018-1000074 rubygems: Unsafe Object Deserialization Vulnerability in gem owner allowing arbitrary code execution on specially crafted YAML
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bcourt, bhu, bkearney, cbillett, ccoleman, dedgar, dmcphers, hhorak, iboverma, jaruga, jgoulding, jmatthew, jorton, jross, lutter, mastahnke, matt, mcressma, mmccune, mrike, mtasaka, ohadlevy, rchan, ruby-maint, s, tomckay, tsanders, vanmeeuwen+fedora, vondruch, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20180215,reported=20180215,source=internet,cvss3=7.8/CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H,cwe=CWE-502,rhel-6/rubygems=wontfix,rhel-7/ruby=affected,mrg-2/rubygems=wontfix,rhn_satellite_6/rubygems=wontfix,sam-1/ruby193-rubygems=wontfix,rhscl-3/rh-ruby25-ruby=affected,rhscl-3/rh-ruby23-ruby=affected,rhscl-3/rh-ruby24-ruby=affected,fedora-all/rubygems=affected,openshift-1/ruby193-rubygems=affected,openshift-1/rubygems=affected,rhel-8/ruby=notaffected
Fixed In Version: rubygems 2.7.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:40:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1651627, 1547431, 1547432, 1547433, 1547437, 1549913, 1549914, 1554493, 1554494, 1651601, 1651611, 1651616, 1651801, 1652039, 1652040    
Bug Blocks: 1547429    

Description Adam Mariš 2018-02-21 10:28:53 UTC
Unsafe object deserialization vulnerability in owner command was found allowing arbitrary code execution when gem owner is run on specially crafted YAML file.

Upstream fix:

https://github.com/rubygems/rubygems/commit/254e3d0ee873c008c0b74e8b8abcbdab4caa0a6d

External References:

https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/

Comment 1 Adam Mariš 2018-02-21 10:38:15 UTC
Created rubygems tracking bugs for this issue:

Affects: fedora-all [bug 1547431]

Comment 8 Andrej Nemec 2018-05-14 13:59:39 UTC
Statement:

This issue affects the versions of rubygems as shipped with Red Hat Subscription Asset Manager 1.x. Red Hat Product Security has rated this issue as having security impact of Moderate. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

This issue affects the versions of rubygems as shipped with Red Hat Satellite version 6 on Red Hat Enterprise Linux version 5. Red Hat Product Security has rated this issue as having security impact of Moderate. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 13 errata-xmlrpc 2018-11-29 09:55:25 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2018:3729 https://access.redhat.com/errata/RHSA-2018:3729

Comment 14 errata-xmlrpc 2018-11-29 10:09:24 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2018:3730 https://access.redhat.com/errata/RHSA-2018:3730

Comment 15 errata-xmlrpc 2018-11-29 10:21:33 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2018:3731 https://access.redhat.com/errata/RHSA-2018:3731

Comment 16 Jun Aruga 2018-12-11 17:42:23 UTC
The actual patch is

> External References:
> 
> https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/

for Ruby 2.2.9: https://bugs.ruby-lang.org/attachments/download/7030/rubygems-276-for-ruby22.patch
or ruby_2_2 branch: https://github.com/ruby/ruby/commit/664b94fd2b4b19edd7d75c6bbcd3154905b2624e

Note: This patch includes several security fixes.