CVE-2026-39807 Details
Description
Reliance on Untrusted Inputs in a Security Decision vulnerability in mtrudel bandit allows unauthenticated transport-state spoofing on plaintext HTTP connections. 'Elixir.Bandit.Pipeline':determine_scheme/2 in lib/bandit/pipeline.ex returns the client-supplied URI scheme verbatim, ignoring the transport's secure? flag. HTTP/1.1 absolute-form request targets (e.g. GET https://victim/path HTTP/1.1) and the HTTP/2 :scheme pseudo-header are both attacker-controlled strings that flow through this function. Over a plaintext TCP connection, a client can declare https and Bandit will set conn.scheme = :https even though no TLS was negotiated. Downstream Plug consumers that branch on conn.scheme are silently misled: Plug.SSL's already-secure branch skips its HTTP→HTTPS redirect, cookies emitted with secure: true are sent over plaintext, audit logs record requests as having arrived over HTTPS, and CSRF/SameSite gating may make incorrect decisions. This issue affects bandit: from 1.0.0 before 1.11.0.
A vulnerability in the mtrudel Bandit web server in Elixir allows unauthenticated transport-state spoofing over unencrypted HTTP connections. The issue arises because the 'determine_scheme/2' function in 'lib/bandit/pipeline.ex' blindly accepts client-supplied URI schemes, disregarding the actual security state of the transport. This flaw can be exploited by sending HTTP/1.1 absolute-form request targets or HTTP/2 :scheme pseudo-headers, both of which are controlled by the attacker. As a result, Bandit may incorrectly set the connection scheme to 'https', even when no TLS was established. This misrepresentation can lead to various downstream issues, such as bypassing security redirects, improperly handling secure cookies, and misrecording audit logs.
Users can upgrade to Bandit version 1.11.0 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 1, 2026CISA-ADP
Assessed May 2, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/mtrudel/bandit/security/advisories/GHSA-375f-4r2h-f99j | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://cna.erlef.org/cves/CVE-2026-39807.html | EEF | AdvisoryBundle |
| https://github.com/mtrudel/bandit/commit/45feea20dea8af7ffd7245271107b695c040e667 | EEF | Source CodeVendor |
| https://github.com/mtrudel/bandit/security/advisories/GHSA-375f-4r2h-f99j | EEF | AdvisoryExploitRemedyVendor |
| https://osv.dev/vulnerability/EEF-CVE-2026-39807 | EEF | AdvisoryBundle |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-807 | Reliance on Untrusted Inputs in a Security Decision | EEF |
Affected Products
| Product | Versions |
|---|---|
| mtrudel bandit | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | EEF |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 2, 2026 | CVE Modified | CISA-ADP |
| May 1, 2026 | New CVE Received | EEF |
Volerion