Skip to content
Heist/ feed
Back to feed
High

HTTP/1 chunked decoder infinite loop on requests with trailer fields in bandit

Type: advisorySources: OSV

Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in mtrudel bandit allows unauthenticated remote denial of service via worker process exhaustion. 'Elixir.Bandit.HTTP1.Socket':do_read_chunked_data!/5 in lib/bandit/http1/socket.ex terminates only when the last-chunk line 0\r\n is followed immediately by the empty trailer line \r\n. RFC 9112 §7.1.2 permits zero or more trailer fields between them. When trailers are present, none of the match clauses fit: the catch-all arm computes a negative to_read, calls read_available!/2, receives <<>> on timeout, and tail-recurses with unchanged state. The worker process is pinned for the lifetime of the TCP connection. A handful of concurrent connections sending RFC-conformant chunked requests with trailer fields is sufficient to exhaust the Bandit worker pool and render the server unresponsive to all further traffic. No authentication, special headers, or large payload is required. Proxies such as NGINX and HAProxy legitimately forward trailer-bearing requests, so servers behind such proxies may be affected without any malicious client involvement. This issue affects bandit: from 1.6.1 before 1.11.1.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-39806
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 14:54 UTC · Revision 1

Source evidence

HTTP/1 chunked decoder infinite loop on requests with trailer fields in bandit

core-osv · Original source

Published 13 May 2026, 13:36 UTC

Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in mtrudel bandit allows unauthenticated remote denial of service via worker process exhaustion. 'Elixir.Bandit.HTTP1.Socket':do_read_chunked_data!/5 in lib/bandit/http1/socket.ex terminates only when the last-chunk line 0\r\n is followed immediately by the empty trailer line \r\n. RFC 9112 §7.1.2 permits zero or more trailer fields between them. When trailers are present, none of the match clauses fit: the catch-all arm computes a negative to_read, calls read_available!/2, receives <<>> on timeout, and tail-recurses with unchanged state. The worker process is pinned for the lifetime of the TCP connection. A handful of concurrent connections sending RFC-conformant chunked requests with trailer fields is sufficient to exhaust the Bandit worker pool and render the server unresponsive to all further traffic. No authentication, special headers, or large payload is required. Proxies such as NGINX and HAProxy legitimately forward trailer-bearing requests, so servers behind such proxies may be affected without any malicious client involvement. This issue affects bandit: from 1.6.1 before 1.11.1.

osv:CVE-2026-39806
Complete source record
{
  "id": "e7b3c13b32d29c13235e402e984215c98a8ef4984f2f1894394bce84a9db2128",
  "url": "https://osv.dev/vulnerability/CVE-2026-39806",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "HTTP/1 chunked decoder infinite loop on requests with trailer fields in bandit",
    "summary": "Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in mtrudel bandit allows unauthenticated remote denial of service via worker process exhaustion. 'Elixir.Bandit.HTTP1.Socket':do_read_chunked_data!/5 in lib/bandit/http1/socket.ex terminates only when the last-chunk line 0\\r\\n is followed immediately by the empty trailer line \\r\\n. RFC 9112 §7.1.2 permits zero or more trailer fields between them. When trailers are present, none of the match clauses fit: the catch-all arm computes a negative to_read, calls read_available!/2, receives <<>> on timeout, and tail-recurses with unchanged state. The worker process is pinned for the lifetime of the TCP connection. A handful of concurrent connections sending RFC-conformant chunked requests with trailer fields is sufficient to exhaust the Bandit worker pool and render the server unresponsive to all further traffic. No authentication, special headers, or large payload is required. Proxies such as NGINX and HAProxy legitimately forward trailer-bearing requests, so servers behind such proxies may be affected without any malicious client involvement. This issue affects bandit: from 1.6.1 before 1.11.1.",
    "evidence": "osv:CVE-2026-39806",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-39806",
      "aliases": [
        "CVE-2026-39806",
        "EEF-CVE-2026-39806",
        "GHSA-rf5q-vwxw-gmrf"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/mtrudel/bandit",
              "type": "GIT",
              "events": [
                {
                  "introduced": "9d86e2756b69dce50cbede6cdc7d0732b28e7276"
                },
                {
                  "fixed": "40a1b8fc924694a0125bbaa7fee101fa43feeb52"
                },
                {
                  "fixed": "ae3520dfdbfab115c638f8c7f6f6b805db34e1ab"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.6.1"
                      },
                      {
                        "fixed": "1.11.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "ae3520dfdbfab115c638f8c7f6f6b805db34e1ab"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.11.0",
            "1.10.4",
            "1.10.3",
            "1.10.2",
            "1.10.1",
            "1.10.0",
            "1.9.0",
            "1.8.0",
            "1.7.0",
            "1.6.11",
            "1.6.10",
            "1.6.9",
            "1.6.8",
            "1.6.7",
            "1.6.6",
            "1.6.5",
            "1.6.4",
            "1.6.3",
            "1.6.2",
            "1.6.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-39806.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:29.829918598Z",
      "provider": "osv",
      "references": [
        "https://cna.erlef.org/cves/CVE-2026-39806.html",
        "https://github.com",
        "https://osv.dev/vulnerability/EEF-CVE-2026-39806",
        "https://repo.hex.pm",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39806.json",
        "https://github.com/mtrudel/bandit/security/advisories/GHSA-rf5q-vwxw-gmrf",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-39806",
        "https://github.com/mtrudel/bandit/commit/ae3520dfdbfab115c638f8c7f6f6b805db34e1ab",
        "https://github.com/mtrudel/bandit"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-835"
        ],
        "cna_assigner": "EEF",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39806.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-39806",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 496565,
  "published_at": "2026-05-13T13:36:17.806+00:00"
}