Skip to main content

Bandit CVE-2026-39807

| EUVDEUVD-2026-26714 MEDIUM
Reliance on Untrusted Inputs in a Security Decision (CWE-807)
2026-05-01 EEF GHSA-375f-4r2h-f99j
6.3
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker positions on network path
  2. Delivery
    Intercept plaintext HTTP connection
  3. Exploit
    Inject spoofed :scheme pseudo-header (https)
  4. Install
    Bandit sets conn.scheme=https
  5. C2
    Plug.SSL skips HTTPS redirect
  6. Execute
    Application issues secure cookies over plaintext
  7. Impact
    Attacker harvests cookies
  8. Step 8
    Session hijack or privilege escalation

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Trusted input validation
Exploitation Conditions

Exploitation requires that Bandit is accessible over plaintext HTTP (not TLS-terminated) and the attacker either (a) controls a network path to the server (transparent proxy, compromised ISP, or rogue WiFi), (b) can send direct TCP connections to Bandit's plaintext port, or (c) can induce a client to connect through a network the attacker controls. No authentication is required; the attack succeeds against default Bandit configuration with no special settings needed. Downstream exploitation of the false scheme value depends on application code: if the app does not check conn.scheme for security decisions, the vulnerability has no effect; if it does (e.g., Plug.SSL middleware, custom cookie logic, CSRF token gating), the impact manifests. The core issue is that Bandit's behavior is correct only when running behind a TLS-terminating proxy that strips client-supplied scheme headers; direct internet exposure without such a proxy leaves the server vulnerable.

Impact

CVSS 6.3 with AV:N (network-accessible) and AC:L (low complexity) indicates broad attack surface, but the AT:P (passive attack) modifier signals that exploitation requires the attacker to intercept or control a network path. Real-world risk depends critically on deployment context: (1) In transparent proxies, CDNs, or load balancers where the attacker can inject or manipulate HTTP headers destined for Bandit, exploitation is trivial and requires no additional user interaction or authentication. (2) If Bandit is directly internet-facing without a proxy layer, the attacker must establish a direct TCP connection to the plaintext HTTP port and inject a malicious scheme-realistic over compromised networks or via DNS rebinding but less common in typical deployments. The impact is not remote code execution but security property violations (VC:L/VI:L indicating low confidentiality and integrity impact per CVSS 4.0 scale), yet the downstream effects are significant: authentication bypass via cookie theft, CSRF token bypass, and audit log spoofing. The absence of active exploitation signals (no KEV status, no public POC referenced in input) suggests this is a recently disclosed or low-prevalence issue, but the straightforward attack vector and clear proof-of-concept in the source code commit mean exploitation tooling could appear quickly. Organizations running Bandit behind untrustworthy proxies or on public internet-facing infrastructure should prioritize patching; those with TLS-terminating reverse proxies in front may have lower immediate risk but should still apply the fix to prevent security assumption violations.

Exploit ScenarioDerived

An attacker on a network path between a client and a Bandit server (e.g., rogue WiFi, compromised ISP, or CDN) intercepts HTTP traffic destined for plaintext Bandit port 80. The attacker injects or modifies the HTTP/1.1 request to use absolute-form with an https:// scheme (GET https://victim.com/login HTTP/1.1) or sets the HTTP/2 :scheme pseudo-header to https. Bandit's determine_scheme/2 function returns scheme='https', and the Plug connection is marked as secure. If the application relies on Plug.SSL's conn.scheme check to gate HTTPS-only features, the redirect is skipped; if cookies are issued with secure: true, they are transmitted over unencrypted TCP and logged by packet sniffers; if a CSRF token is only issued over 'https', it may be issued over plaintext. The attacker can then harvest sensitive cookies, forge requests without valid CSRF tokens, or perform account takeover.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 01, 2026

Transport-state spoofing in Bandit 1.0.0 through 1.10.x allows unauthenticated remote attackers to forge HTTPS connections over plaintext HTTP by supplying a malicious URI scheme in HTTP/1.1 absolute-form request targets or HTTP/2 :scheme pseudo-headers. The vulnerable determine_scheme/2 function returns client-supplied scheme values verbatim, causing downstream Plug middlewares to make incorrect security decisions: Plug.SSL skips HTTP→HTTPS redirects, secure cookies are transmitted unencrypted, and CSRF/SameSite protections may be bypassed. CVSS 6.3 (network-accessible, low complexity). Vendor patch available (version 1.11.0+).

RemediationAI

Vendor-released patch: upgrade to Bandit version 1.11.0 or later. The patch refactors determine_scheme/2 to accept only the secure? boolean flag (representing the transport's TLS status) and discards the client-supplied request_target scheme parameter entirely, returning 'https' if secure?=true and 'http' otherwise. No upgrade path exists for versions prior to 1.0.0. Workarounds: For users unable to upgrade immediately, deploy Bandit behind a TLS-terminating reverse proxy (nginx, HAProxy) that strips or validates the :scheme pseudo-header and ensures the origin server observes only the proxy's own scheme header, preventing client spoofing. Additionally, configure Plug.SSL with explicit assume_secure: true if behind a trusted proxy, forcing all downstream logic to treat connections as HTTPS regardless of conn.scheme-note this disables the HTTP→HTTPS redirect and should only be used with a proxy that enforces TLS to clients. Audit downstream Plug middleware (especially custom authentication and cookie-handling code) for conn.scheme-based branches and add explicit transport-based checks using the socket's underlying state rather than relying on the scheme field. None of these workarounds fully eliminate the vulnerability; upgrade is the only complete fix.

Affected VersionsENISA

bandit 1.0.0 <1.11.0
bandit ff2f829326cd5dcf7335939aef9775269d881e28 <1.11.0

Affected Packages

euvd bandit fix: 1.11.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Bandit is an HTTP server for the Elixir/Erlang ecosystem built on Plug. The vulnerable code path is in lib/bandit/pipeline.ex:determine_scheme/2, which processes HTTP request metadata to populate the Plug connection struct's scheme field. In HTTP/1.1, clients can send absolute-form request targets (RFC 9110 Section 7.2) like GET https://victim/path HTTP/1.1 over plaintext TCP; similarly, HTTP/2 allows clients to set the :scheme pseudo-header to any value. The original implementation extracted and returned this client-controlled scheme directly without validating against the underlying transport's TLS status (the secure? boolean flag representing whether the socket negotiated TLS). This violates CWE-807 (Reliance on Untrusted Inputs in a Security Decision) by trusting attacker-controlled input where a security-critical decision (scheme := https vs http) should depend only on cryptographic transport properties. Downstream Plug consumers-including Plug.SSL middleware and applications performing conn.scheme-based branching-inherit this false signal, leading to logic errors in cookie security, redirect logic, logging, and CSRF token validation.

Know when Bandit gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (EEF) PRIMARY 6.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (EEF) · only source for this CVE.

CVSS VectorVendor: EEF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
CVSS changed
May 01, 2026 - 21:22 NVD
6.3 (MEDIUM)
Patch released
May 01, 2026 - 21:01 nvd
Patch available
CVE Published
May 01, 2026 - 20:34 nvd
MEDIUM 6.3

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

More in Bandit

View all
CVE-2026-42786 HIGH POC
8.7 May 01

Memory exhaustion in Bandit WebSocket server (versions 0.5.0 through 1.10.x) allows unauthenticated remote attackers to

CVE-2026-39804 HIGH POC
8.2 May 01

Memory exhaustion in Bandit WebSocket server (versions 0.5.9 through 1.10.x) allows unauthenticated remote attackers to

CVE-2026-42788 MEDIUM POC
6.9 May 01

Denial of service in mtrudel bandit via HTTP/2 frame deserialization allows unauthenticated remote attackers to exhaust

CVE-2026-39805 MEDIUM POC
6.3 May 01

HTTP request smuggling in mtrudel bandit before version 1.11.0 allows unauthenticated attackers to bypass edge security

CVE-2026-105659 HIGH
8.7 Oct 14

Uncontrolled HTTP/2 flow-control resource consumption in mtrudel/bandit 1.4.0 and later lets an unauthenticated remote p

CVE-2026-39806 HIGH
8.7 May 13

Unauthenticated remote denial of service in mtrudel Bandit (Elixir HTTP server) versions 1.6.1 through 1.11.0 lets any c

CVE-2026-65623 HIGH
8.7 Jul 24

CPU exhaustion in bandit 1.11.0 to 1.12.0 allows unauthenticated remote denial-of-service via WebSocket fragment reassem

CVE-2026-39803 HIGH
8.7 May 13

Unauthenticated remote denial of service in Bandit (the Elixir HTTP/1 web server for Phoenix/Plug applications) versions

CVE-2026-116078 HIGH
8.7 Oct 28

Bandit's HTTP/2 request body reader amplifies memory use, letting an unauthenticated remote client make a server hold ro

CVE-2026-108529 HIGH
8.7 Oct 26

Unauthenticated remote CPU exhaustion in mtrudel Bandit's HTTP/2 server (versions before 1.14.0) is achievable by holdin

CVE-2026-110499 HIGH
8.7 Oct 26

Unbounded per-connection memory and CPU growth in the Elixir Bandit HTTP/2 server (0.3.6 up to 1.14.0) lets an unauthent

CVE-2026-109584 HIGH
8.7 Oct 26

Unauthenticated remote attackers can exhaust BEAM node memory on default-configured mtrudel Bandit HTTP/2 servers (0.3.3

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy