Bug 1561952 (CVE-2017-17742) - CVE-2017-17742 ruby: HTTP response splitting in WEBrick
Summary: CVE-2017-17742 ruby: HTTP response splitting in WEBrick
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2017-17742
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1561956 1561957 1561958 1563873 1563874 1565258 1567035 1567036 1567037 1567038 1567039 1651798 1652037 1652038 1802765 1802766 1821482
Blocks: 1561954
TreeView+ depends on / blocked
 
Reported: 2018-03-29 09:08 UTC by Adam Mariš
Modified: 2021-02-17 00:34 UTC (History)
29 users (show)

Fixed In Version: ruby 2.2.10, ruby 2.3.7, ruby 2.4.4, ruby 2.5.1
Doc Type: If docs needed, set a value
Doc Text:
It was found that WEBrick did not sanitize headers sent back to clients, resulting in a response-splitting vulnerability. An attacker, able to control the server's headers, could force WEBrick into injecting additional headers to a client.
Clone Of:
Environment:
Last Closed: 2019-06-10 10:19:11 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3729 0 None None None 2018-11-29 09:56:56 UTC
Red Hat Product Errata RHSA-2018:3730 0 None None None 2018-11-29 10:11:42 UTC
Red Hat Product Errata RHSA-2018:3731 0 None None None 2018-11-29 10:22:45 UTC
Red Hat Product Errata RHSA-2019:2028 0 None None None 2019-08-06 12:03:54 UTC
Red Hat Product Errata RHSA-2020:1963 0 None None None 2020-04-29 10:06:53 UTC
Red Hat Product Errata RHSA-2020:2212 0 None None None 2020-05-19 14:41:10 UTC
Red Hat Product Errata RHSA-2020:2288 0 None None None 2020-05-26 11:16:58 UTC

Description Adam Mariš 2018-03-29 09:08:50 UTC
If a script accepts an external input and outputs it without modification as a part of HTTP responses, an attacker can use newline characters to deceive the clients that the HTTP response header is stopped at there, and can inject fake HTTP responses after the newline characters to show malicious contents to the clients.

Affected versions:

Ruby 2.2 series: 2.2.9 and earlier
Ruby 2.3 series: 2.3.6 and earlier
Ruby 2.4 series: 2.4.3 and earlier
Ruby 2.5 series: 2.5.0 and earlier

External References:

https://www.ruby-lang.org/en/news/2018/03/28/http-response-splitting-in-webrick-cve-2017-17742/

Comment 1 Adam Mariš 2018-03-29 09:15:12 UTC
Created ruby tracking bugs for this issue:

Affects: fedora-all [bug 1561957]

Comment 7 Cedric Buissart 2018-04-17 10:08:18 UTC
Mitigation:

The server can manually sanitize possibly untrusted headers prior to inserting them in the reply.

Comment 8 Andrej Nemec 2018-05-14 15:26:51 UTC
Statement:

This issue affects the versions of ruby as shipped with Red Hat CloudForms 4. 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 ruby as shipped with Red Hat Subscription Asset Manager 1. 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 9 Jun Aruga 2018-11-15 15:18:21 UTC
> Affected versions:

Upstream patch:

trunk
https://github.com/ruby/ruby/commit/d9d4a28f1cdd05a0e8dabb36d747d40bbcc30f16

> Ruby 2.2 series: 2.2.9 and earlier

Backport to Ruby 2.2.
On ruby_2_2 branch
https://github.com/ruby/ruby/commit/bbda1a027475bf7ce5e1a9583a7b55d0be71c8fe

> Ruby 2.3 series: 2.3.6 and earlier
> Ruby 2.4 series: 2.4.3 and earlier
> Ruby 2.5 series: 2.5.0 and earlier

Check ruby_2_X branches searching by "webrick: prevent response splitting and header injection".

Comment 12 errata-xmlrpc 2018-11-29 09:56:45 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 13 errata-xmlrpc 2018-11-29 10:11:30 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 14 errata-xmlrpc 2018-11-29 10:22: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 15 errata-xmlrpc 2019-08-06 12:03:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 18 errata-xmlrpc 2020-04-29 10:06:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.5 Extended Update Support

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

Comment 19 errata-xmlrpc 2020-05-19 14:41:07 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:2212 https://access.redhat.com/errata/RHSA-2020:2212

Comment 20 errata-xmlrpc 2020-05-26 11:16:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.6 Extended Update Support

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


Note You need to log in before you can comment on or make changes to this bug.