Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS01anBtLXg1OHYtNjI0ds4AA6Rf

Netty's HttpPostRequestDecoder can OOM

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.

Permalink: https://github.com/advisories/GHSA-5jpm-x58v-624v
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS01anBtLXg1OHYtNjI0ds4AA6Rf
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: about 1 month ago
Updated: about 1 month ago


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

Identifiers: GHSA-5jpm-x58v-624v, CVE-2024-29025
References: Repository: https://github.com/netty/netty
Blast Radius: 20.2

Affected Packages

maven:io.netty:netty-codec-http
Dependent packages: 1,324
Dependent repositories: 6,505
Downloads:
Affected Version Ranges: < 4.1.108.Final
Fixed in: 4.1.108.Final
All affected versions: 4.1.10-0.Final, 4.1.10-1.Final, 4.1.10-2.Final, 4.1.10-3.Final, 4.1.10-4.Final, 4.1.10-5.Final, 4.1.10-6.Final, 4.1.10-7.Final
All unaffected versions: