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
21
rack vulnerability
redos
content type parsing
server takeover

CVSS3

5.3

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

AI Score

5.1

Confidence

High

EPSS

0

Percentile

10.3%

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.42.2.8.1
OR
rackrackRange3.0.03.0.9.1
VendorProductVersionCPE
rackrack*cpe:2.3:a:rack:rack:*:*:*:*:*:*:*:*

CVSS3

5.3

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

AI Score

5.1

Confidence

High

EPSS

0

Percentile

10.3%