Bug 1773728 (CVE-2019-16201) - CVE-2019-16201 ruby: regular expression denial of service vulnerability of WEBrick's Digest access authentication
Summary: CVE-2019-16201 ruby: regular expression denial of service vulnerability of WE...
Status: NEW
Alias: CVE-2019-16201
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1784828 1784829 1784830 1784831 1773729 1784832 1784833
Blocks: 1773730
TreeView+ depends on / blocked
Reported: 2019-11-18 19:49 UTC by Guilherme de Almeida Suckevicz
Modified: 2019-12-18 12:37 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2019-11-18 19:49:28 UTC
Regular expression denial of service vulnerability of WEBrick’s Digest authentication module was found. An attacker can exploit this vulnerability to cause an effective denial of service against a WEBrick service.


Comment 1 Guilherme de Almeida Suckevicz 2019-11-18 19:49:48 UTC
Created ruby tracking bugs for this issue:

Affects: fedora-all [bug 1773729]

Comment 3 Marco Benatto 2019-12-17 19:11:15 UTC
Upstream patch for this issue:


commit 36e057e26ef2104bc2349799d6c52d22bb1c7d03
Author: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date:   Tue Aug 13 12:14:28 2019 +0900

    Loop with String#scan without creating substrings

    Create the substrings necessary parts only, instead of cutting the
    rest of the buffer.  Also removed a useless, probable typo, regexp.

Comment 6 Marco Benatto 2019-12-18 12:36:51 UTC
There's an issue with HTTPAuth when using AuthDigest mode in Ruby and webricks. When using DigestAuth HTTP authentication method, ruby uses a regular expression to split the session parameters in split_param_value() function. There's a flaw on the regular expression mentioned earlier which an attacker may leverage by sending a crafted message header which leads the regular expression to a heavily CPU consuming backtracking resulting in DoS.

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