Bug 1692516 (CVE-2019-8322)

Summary: CVE-2019-8322 rubygems: Escape sequence injection vulnerability in gem owner
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: dajohnso, dmetzger, gblomqui, gmccullo, gtanzill, hhorak, jfrey, jhardy, jorton, jprause, jschluet, kdixon, lutter, mastahnke, mtasaka, obarenbo, roliveri, ruby-maint, simaishi, s, thoger, tkonishi, vanmeeuwen+fedora, vondruch
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: 2019-06-10 10:51:52 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: 1692530, 1695928, 1695930, 1695931, 1695932, 1695933, 1695934, 1699283, 1700313, 1700325, 1713073, 1837068    
Bug Blocks: 1692529    

Description Pedro Sampaio 2019-03-25 18:59:31 UTC
An issue was discovered in RubyGems 2.6 and later through 3.0.2. The gem owner command outputs the contents of the API response directly to stdout. Therefore, if the response is crafted, escape sequence injection may occur.

Upstream patch:

https://bugs.ruby-lang.org/attachments/7669

References:

https://www.ruby-lang.org/en/news/2019/03/05/multiple-vulnerabilities-in-rubygems/
https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html

Comment 1 Pedro Sampaio 2019-03-25 19:14:28 UTC
Created rubygems tracking bugs for this issue:

Affects: fedora-all [bug 1692530]

Comment 2 Scott Gayou 2019-04-03 22:40:15 UTC
Flaw is in owner_command.rb

```ruby
    with_response response do |resp|
      owners = Gem::SafeYAML.load clean_text(resp.body)
      say "Owners for gem: #{name}"
      owners.each do |owner|
```

Comment 5 errata-xmlrpc 2019-05-13 09:02:49 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-2019:1148 https://access.redhat.com/errata/RHSA-2019:1148

Comment 6 errata-xmlrpc 2019-05-13 09:18:52 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-2019:1150 https://access.redhat.com/errata/RHSA-2019:1150

Comment 7 errata-xmlrpc 2019-05-15 17:53:12 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:1235 https://access.redhat.com/errata/RHSA-2019:1235

Comment 12 errata-xmlrpc 2019-06-11 05:32:39 UTC
This issue has been addressed in the following products:

  CloudForms Management Engine 5.10

Via RHSA-2019:1429 https://access.redhat.com/errata/RHSA-2019:1429

Comment 17 errata-xmlrpc 2020-06-30 12:09:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Advanced Update Support
  Red Hat Enterprise Linux 7.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.4 Telco Extended Update Support

Via RHSA-2020:2769 https://access.redhat.com/errata/RHSA-2020:2769