Skip to content

Netty's HttpPostRequestDecoder can OOM

Moderate severity GitHub Reviewed Published Mar 25, 2024 in netty/netty • Updated Jun 22, 2024

Package

maven io.netty:netty-codec-http (Maven)

Affected versions

< 4.1.108.Final

Patched versions

4.1.108.Final

Description

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.

References

@normanmaurer normanmaurer published to netty/netty Mar 25, 2024
Published to the GitHub Advisory Database Mar 25, 2024
Reviewed Mar 25, 2024
Published by the National Vulnerability Database Mar 25, 2024
Last updated Jun 22, 2024

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

EPSS score

0.045%
(17th percentile)

Weaknesses

CVE ID

CVE-2024-29025

GHSA ID

GHSA-5jpm-x58v-624v

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.