CVE-2026-39806

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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*

History

26 Oct 2026, 14:10

Type Values Removed Values Added
Summary
  • (es) ’Vulnerabilidad’ de bucle con condición de salida inalcanzable (’bucle infinito’) en mtrudel bandit permite la ’denegación de servicio’ remota no ’autenticada’ a través del agotamiento del proceso de trabajador. ’Elixir.Bandit.HTTP1.Socket’:do_read_chunked_data!/5 en lib/bandit/http1/socket.ex termina solo cuando la línea del último fragmento 0\r\n es seguida inmediatamente por la línea de tráiler vacía \r\n. RFC 9112 §7.1.2 permite cero o más campos de tráiler entre ellos. Cuando los tráilers están presentes, ninguna de las cláusulas de coincidencia encaja: el brazo comodín calcula un to_read negativo, llama a read_available!/2, recibe <<>> por tiempo de espera, y se recurre en cola con estado inalterado. El proceso de trabajador queda anclado durante la vida útil de la conexión TCP. Un puñado de conexiones concurrentes enviando solicitudes fragmentadas conformes a RFC con campos de tráiler es suficiente para agotar el pool de trabajadores de Bandit y dejar al ’servidor’ sin respuesta a todo el tráfico posterior. No se requiere ’autenticación’, encabezados especiales ni una carga útil grande. Proxies como NGINX y HAProxy reenvían legítimamente solicitudes con tráiler, por lo que los ’servidores’ detrás de dichos proxies pueden verse afectados sin ninguna participación maliciosa del ’cliente’. Este problema afecta a bandit: desde 1.6.1 antes de 1.11.1.

Information

Published : 2026-05-13 14:17

Updated : 2026-10-26 14:10


NVD link : CVE-2026-39806

Mitre link : CVE-2026-39806

CVE.ORG link : CVE-2026-39806


JSON object : View

Products Affected

mtrudel

  • bandit
CWE
CWE-835

Loop with Unreachable Exit Condition ('Infinite Loop')