ghsa-5jpm-x58v-624v
Vulnerability from github
Published
2024-03-25 19:40
    Modified
2024-06-22 00:30
    
        Severity ?
      
      
    
        VLAI Severity ?
      
      Summary
Netty's HttpPostRequestDecoder can OOM
    Details
Summary
The HttpPostRequestDecoder can be tricked to accumulate data. I have spotted currently two attack vectors 
Details
- 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 
bodyListHttpDatalist. - The decoder cumulates bytes in the 
undecodedChunkbuffer 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": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "io.netty:netty-codec-http"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.1.108.Final"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-29025"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-03-25T19:40:50Z",
    "nvd_published_at": "2024-03-25T20:15:08Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\nThe `HttpPostRequestDecoder` can be tricked to accumulate data. I have spotted currently two attack vectors \n\n### Details\n1. 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.\n2. The decoder cumulates bytes in the `undecodedChunk` buffer until it can decode a field, this field can cumulate data without limits\n\n### PoC\n\nHere is a Netty branch that provides a fix + tests : https://github.com/vietj/netty/tree/post-request-decoder\n\n\nHere is a reproducer with Vert.x (which uses this decoder) https://gist.github.com/vietj/f558b8ea81ec6505f1e9a6ca283c9ae3\n\n### Impact\nAny Netty based HTTP server that uses the `HttpPostRequestDecoder` to decode a form.",
  "id": "GHSA-5jpm-x58v-624v",
  "modified": "2024-06-22T00:30:55Z",
  "published": "2024-03-25T19:40:50Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/netty/netty/security/advisories/GHSA-5jpm-x58v-624v"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-29025"
    },
    {
      "type": "WEB",
      "url": "https://github.com/netty/netty/commit/0d0c6ed782d13d423586ad0c71737b2c7d02058c"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/vietj/f558b8ea81ec6505f1e9a6ca283c9ae3"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/netty/netty"
    },
    {
      "type": "WEB",
      "url": "https://github.com/vietj/netty/tree/post-request-decoder"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00015.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Netty\u0027s HttpPostRequestDecoder can OOM"
}
  Loading…
      Loading…
      Sightings
| Author | Source | Type | Date | 
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
 - Confirmed: The vulnerability is confirmed from an analyst perspective.
 - Published Proof of Concept: A public proof of concept is available for this vulnerability.
 - Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
 - Patched: This vulnerability was successfully patched by the user reporting the sighting.
 - Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
 - Not confirmed: The user expresses doubt about the veracity of the vulnerability.
 - Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
 
Loading…
      Loading…