Vulnerability in bandit (CVE-2026-39806)
Summary
Vulnerability in bandit (CVE-2026-39806). Risk of unauthorized operations or information disclosure. Mitigation: upgrade to 1.11.1 or later.
Original description
The description as published by the source.
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.
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-39806 has been found in bandit.
Risk of unauthorized operations or information disclosure. CVSS score: 7.5/10.
What to do: upgrade bandit to 1.11.1 or later.
If unsure, ask your IT team or search "bandit CVE-2026-39806" on the vendor's site.
CVE-2026-39806 (bandit) — CWE-835 / CVSS v3 7.5
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Patched: 1.11.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-835) exists in bandit.
Check the vendor advisory for the affected versions of bandit.
Severity: High (CVSS 7.5/10). Risk of unauthorized operations or information disclosure.
Update to 1.11.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'bandit' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'bandit' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
banditを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade bandit to 1.11.1ステージング環境で 1.11.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory github.com
- advisory nvd.nist.gov
- package hex.pm
- package github.com
- patch github.com
- web cna.erlef.org
- web osv.dev
- web github.com