Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.6%top 53%

CVE-2026-39806: CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop') in mtrudel bandit

0
High
VulnerabilityCVE-2026-39806cvecve-2026-39806cwe-835
Published: 05/13/2026 (05/13/2026, 13:36:17 UTC)
Source: CVE Database V5
Vendor/Project: mtrudel
Product: bandit

Description

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.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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 software

bandit
pkg:hex/bandit
Affected versions
=1.6.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/27/2026, 20:06:05 UTC

Technical Analysis

The vulnerability arises in the Elixir.Bandit.HTTP1.Socket module's do_read_chunked_data!/5 function, which expects the last chunk line (0\r\n) to be immediately followed by an empty trailer line (\r\n). However, RFC 9112 permits zero or more trailer fields between these lines. When trailers are present, the function's pattern matching fails, causing a catch-all clause to compute a negative to_read value and recursively call read_available!/2 without progressing. This results in an infinite loop that pins the worker process for the duration of the TCP connection. Multiple concurrent connections with trailer-bearing chunked requests can exhaust the Bandit worker pool, making the server unresponsive. This affects bandit versions from 1.6.1 up to but not including 1.11.1.

Potential Impact

An unauthenticated remote attacker or even legitimate clients/proxies sending RFC-compliant chunked requests with trailer fields can cause worker process exhaustion, resulting in a denial of service condition. The server becomes unresponsive to further traffic due to all worker processes being pinned in infinite loops. No special privileges or large payloads are required to trigger the issue.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is indicated in the provided data. Until a patch is available, consider limiting or filtering requests with trailer fields at upstream proxies if feasible to reduce exposure.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
EEF
Date Reserved
2026-04-07T12:28:54.916Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a0488f0cbff5d8610d62f9e

Added to database: 05/13/2026, 14:21:36 UTC

Last enriched: 05/27/2026, 20:06:05 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 93

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses