Lucene search

K
githubGitHub Advisory DatabaseGHSA-22F2-V57C-J9CX
HistoryFeb 28, 2024 - 10:57 p.m.

Rack vulnerable to ReDoS in content type parsing (2nd degree polynomial)

2024-02-2822:57:26
CWE-1333
GitHub Advisory Database
github.com
15
rack vulnerability
redos
content type parsing
server takeover

5.3 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

5.1 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

10.5%

Summary

module Rack
  class MediaType
    SPLIT_PATTERN = %r{\s*[;,]\s*}

The above regexp is subject to ReDos. 50K blank characters as a prefix to the header will take over 10s to split.

PoC

A simple HTTP request with lots of blank characters in the content-type header:

request["Content-Type"] = (" " * 50_000) + "a,"

Impact

It’s a very easy to craft ReDoS. Like all ReDoS the impact is debatable.

Affected configurations

Vulners
Node
rackrackRange0.4
OR
rackrackRange<2.2.8.1
OR
rackrackRange<3.0.9.1
CPENameOperatorVersion
rackge0.4
racklt2.2.8.1
racklt3.0.9.1

5.3 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

5.1 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

10.5%