Lucene search

K
githubGitHub Advisory DatabaseGHSA-5JPM-X58V-624V
HistoryMar 25, 2024 - 7:40 p.m.

Netty's HttpPostRequestDecoder can OOM

2024-03-2519:40:50
CWE-770
GitHub Advisory Database
github.com
31
netty
httppostrequestdecoder
oom
data accumulation
attack vectors
vert.x
vulnerability
fix
impact

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

6.7

Confidence

Low

EPSS

0

Percentile

15.5%

Summary

The HttpPostRequestDecoder can be tricked to accumulate data. I have spotted currently two attack vectors

Details

  1. While the decoder can store items on the disk if configured so, there are no limits to the number of fields the form can have, an attacher can send a chunked post consisting of many small fields that will be accumulated in the bodyListHttpData list.
  2. The decoder cumulates bytes in the undecodedChunk buffer until it can decode a field, this field can cumulate data without limits

PoC

Here is a Netty branch that provides a fix + tests : https://github.com/vietj/netty/tree/post-request-decoder

Here is a reproducer with Vert.x (which uses this decoder) https://gist.github.com/vietj/f558b8ea81ec6505f1e9a6ca283c9ae3

Impact

Any Netty based HTTP server that uses the HttpPostRequestDecoder to decode a form.

Affected configurations

Vulners
Node
io.nettynetty-codec-httpRange<4.1.108.Final
VendorProductVersionCPE
io.nettynetty-codec-http*cpe:2.3:a:io.netty:netty-codec-http:*:*:*:*:*:*:*:*

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

6.7

Confidence

Low

EPSS

0

Percentile

15.5%