# CVE-2026-39806: HTTP/1 chunked decoder infinite loop on requests with trailer fields in bandit

- Severity: High 8.7 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.76%, higher than 56% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-13T13:36:17.806Z
- Modified: 2026-11-25T17:23:05.724Z
- Also known as: GHSA-rf5q-vwxw-gmrf, EEF-CVE-2026-39806
- Weaknesses: CWE-835
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: EEF

## Description

Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in mtrudel bandit allows unauthenticated remote denial of service via worker process exhaustion.

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.

(As written by CVE List.)

## Affected

- bandit: from 1.6.1 before 1.11.1
- mtrudel/bandit: from e73e379ab59840e8561b5730878f16e29ab06217 before ae3520dfdbfab115c638f8c7f6f6b805db34e1ab
- bandit (Hex): from 1.6.0 before 1.11.1; from 1.6.1 before 1.11.1
- https://github.com/mtrudel/bandit: from e73e379ab59840e8561b5730878f16e29ab06217 before ae3520dfdbfab115c638f8c7f6f6b805db34e1ab
- mtrudel bandit: from 1.6.1 before 1.11.1

## Every score

- EEF: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/mtrudel/bandit/security/advisories/GHSA-rf5q-vwxw-gmrf> (exploit, advisory, related, vendor-advisory, web)
- <https://cna.erlef.org/cves/CVE-2026-39806.html> (related, third-party-advisory, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-39806> (related, third-party-advisory, web)
- <https://github.com/mtrudel/bandit/commit/e73e379ab59840e8561b5730878f16e29ab06217> (related, web)
- <https://github.com/mtrudel/bandit/commit/ae3520dfdbfab115c638f8c7f6f6b805db34e1ab> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-39806> (advisory)
- <https://github.com/mtrudel/bandit> (package)
- <https://hex.pm/packages/bandit> (package)

## Sources

- CVE List: [CVE-2026-39806](https://www.cve.org/CVERecord?id=CVE-2026-39806), CVE Terms of Use, modified 2026-11-20
- GitHub Advisory Database: [GHSA-rf5q-vwxw-gmrf](https://github.com/advisories/GHSA-rf5q-vwxw-gmrf), CC-BY-4.0, modified 2026-06-08
- Erlang Ecosystem Foundation: [EEF-CVE-2026-39806](https://osv.dev/vulnerability/EEF-CVE-2026-39806), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-39806](https://nvd.nist.gov/vuln/detail/CVE-2026-39806), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-39806 · Whole record: https://cve.day/CVE-2026-39806.json · Rebuilt by cve.day 2026-11-25T22:59:21.543Z
