CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-39807

CVE-2026-39807: Transport-State Spoofing via Untrusted URI Scheme in Bandit HTTP Server

Alon Barad
Alon Barad
Software Engineer

May 7, 2026·4 min read·35 visits

Executive Summary (TL;DR)

A logic flaw in the Bandit HTTP server allows attackers to forge the connection scheme. Sending an absolute-form HTTP request over a plaintext connection causes the server to treat the request as HTTPS, bypassing SSL redirects and leaking secure cookies.

The Bandit HTTP server prior to version 1.11.0 contains a transport-state spoofing vulnerability. The application incorrectly prioritizes the client-supplied URI scheme over the verified transport-layer encryption status. This allows unauthenticated attackers to spoof the connection state as secure (HTTPS) over a plaintext connection, bypassing security middleware and exposing secure cookies.

Vulnerability Overview

Bandit is an HTTP server written in Elixir, responsible for accepting client connections and generating a Plug.Conn struct for downstream application logic. The conn.scheme attribute communicates the security context of the connection to the application.

CVE-2026-39807 is a transport-state spoofing vulnerability categorized as CWE-807 (Reliance on Untrusted Inputs in a Security Decision). The server incorrectly prioritizes the URI scheme supplied by the client over the verified state of the underlying transport layer.

This architecture failure permits unencrypted HTTP connections to present themselves as secure HTTPS connections within the application context. Downstream middleware relies on this spoofed context to make security decisions, resulting in multiple logic bypasses.

Root Cause Analysis

The vulnerability originates from a regression introduced in June 2023 via commit ff2f8293. The function Bandit.Pipeline.determine_scheme/2 in lib/bandit/pipeline.ex processes incoming request metadata to populate the Plug.Conn struct.

The function implementation evaluated a tuple containing both the transport adapter's secure? boolean and the client-supplied scheme. The final case match in this function blindly extracted the client-supplied scheme.

By matching on the client-supplied data irrespective of the secure? flag, the pipeline elevated an untrusted header to an authoritative state property. The transport layer's native encryption state was explicitly discarded.

Code Analysis

The vulnerable code in lib/bandit/pipeline.ex demonstrates the flaw in prioritization. The third match arm returns the client-provided scheme regardless of the physical secure? transport status.

# lib/bandit/pipeline.ex (Vulnerable)
defp determine_scheme({secure?, _, _, _}, {scheme, _, _, _}) do
  case {scheme, secure?} do
    {nil, true} -> {:ok, "https"}
    {nil, false} -> {:ok, "http"}
    {scheme, _} -> {:ok, scheme}  # Vulnerability: Accepts client scheme
  end
end

Commit 45feea20dea8af7ffd7245271107b695c040e667 resolves this behavior by entirely removing the client scheme parameter from the evaluation function.

# lib/bandit/pipeline.ex (Fixed)
@spec determine_scheme(boolean()) :: String.t()
defp determine_scheme(true), do: "https"
defp determine_scheme(false), do: "http"

The patched version guarantees that the application scheme strictly mirrors the transport layer's physical configuration, eliminating the influence of client headers.

Exploitation Methodology

Exploitation requires network access to a plaintext port served by Bandit. The attacker initiates a standard TCP connection without TLS negotiation.

The attacker issues an HTTP/1.1 absolute-form request target or an HTTP/2 request with a manipulated :scheme pseudo-header. The absolute-form syntax explicitly specifies the https scheme in the request line.

GET https://target-server.internal/restricted-endpoint HTTP/1.1
Host: target-server.internal

Bandit processes this payload and populates the Plug.Conn struct with scheme: :https. The connection proceeds through the application pipeline possessing a falsified security context.

Security Impact Assessment

The spoofed scheme systematically bypasses Elixir security middleware. The Plug.SSL module validates conn.scheme to enforce HTTP-to-HTTPS redirection. Under exploitation, Plug.SSL observes the spoofed :https value and skips the redirection block.

Authentication mechanisms that issue session cookies with the secure: true flag will transmit these tokens over the unencrypted connection. The application operates under the false assumption that it is writing to an encrypted socket.

Network interceptors or adversaries positioned on the local network segment can capture these secure session tokens. CSRF prevention mechanisms and SameSite cookie validations that perform origin scheme matching are similarly bypassed.

Mitigation and Remediation

The primary remediation is upgrading the bandit dependency to version 1.11.0. This version contains the logic patch that strictly ties the scheme to the underlying transport security state.

Administrators who cannot immediately patch must deploy compensating controls. Reverse proxies placed in front of Bandit can rewrite the HTTP request lines to strip absolute-form targets.

Disabling all plaintext listeners on the Bandit server eliminates the attack vector entirely. When Bandit only listens on TLS-enabled sockets, the secure? flag is permanently true, nullifying the scheme spoofing objective.

Official Patches

mtrudelOfficial GitHub Security Advisory

Fix Analysis (1)

Technical Appendix

CVSS Score
6.3/ 10
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
EPSS Probability
0.02%
Top 95% most exploited

Affected Systems

Bandit HTTP Server for ElixirElixir applications utilizing Plug.Conn via BanditDeployments exposing plaintext (non-TLS) HTTP ports

Affected Versions Detail

Product
Affected Versions
Fixed Version
bandit
mtrudel
>= 1.0.0, < 1.11.01.11.0
AttributeDetail
CWE IDCWE-807
Attack VectorNetwork
CVSS Score6.3
EPSS Score0.00018
ImpactSecurity feature bypass and confidentiality loss
Exploit StatusProof of Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1552Forge Web Credentials
Credential Access
CWE-807
Reliance on Untrusted Inputs in a Security Decision

The system makes a security decision based on input from an untrusted source, which can be modified by an attacker.

Known Exploits & Detection

Commit Test SuiteUnit tests implementing the spoofing payload to verify the patch effectiveness.

Vulnerability Timeline

Vulnerability introduced via PR #160
2023-06-08
Vulnerability patched in Bandit version 1.11.0
2026-05-01
CVE-2026-39807 and GHSA-375f-4r2h-f99j published
2026-05-01

References & Sources

  • [1]GitHub Security Advisory GHSA-375f-4r2h-f99j
  • [2]EEF CNA Advisory for CVE-2026-39807
  • [3]Bandit Fix Commit 45feea20
  • [4]OSV Record EEF-CVE-2026-39807

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-63349
7.0

CVE-2026-63349: Privilege Dropping Bypass and Denial of Service in AnyIO Subprocess Module

CVE-2026-63349 is a critical privilege-dropping bypass vulnerability in the AnyIO asynchronous framework (versions 4.14.0 and 4.14.1) on POSIX platforms. Due to a variable assignment typo, supplementary groups specified by the developer are not correctly propagated to the execution backend, resulting in subprocesses retaining the parent process's elevated supplementary group permissions.

Alon Barad
Alon Barad
5 views•5 min read
•about 2 hours ago•CVE-2026-63406
5.9

CVE-2026-63406: Information Disclosure via Insecure Telemetry and Hardcoded Credentials in AnyCable-Go

CVE-2026-63406 is an information disclosure vulnerability in AnyCable-go prior to version 1.6.15. The built-in telemetry client is enabled by default with a hardcoded public authentication token ('secret'). This client digests highly sensitive configuration parameters and command-line arguments, including JWT secrets and RPC secrets, into a stable SHA-256 fingerprint. This fingerprint is sent over public networks, exposing those administrative secrets to offline dictionary and brute-force attacks if intercepted.

Alon Barad
Alon Barad
4 views•5 min read
•about 3 hours ago•CVE-2026-84992
6.1

CVE-2026-84992: Cross-Site Scripting (XSS) via Fenced Code Block Parsing in md-editor-v3

CVE-2026-84992 is a Cross-Site Scripting (XSS) vulnerability affecting md-editor-v3 before version 6.5.4. It occurs because the fenced-code block language parser directly interpolates unescaped language metadata into unquoted HTML attributes inside the custom rendering callback. This bypasses the built-in XSSPlugin which runs during the parsing phase, before rendering.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 4 hours ago•CVE-2026-81505
7.1

CVE-2026-81505: Broken Object Level Authorization (BOLA) in Convoy Webhook Source Retrieval

CVE-2026-81505 is a high-severity Broken Object Level Authorization (BOLA) / Insecure Direct Object Reference (IDOR) vulnerability in Convoy, a cloud-native webhooks gateway. In affected versions prior to 26.6.8, the single-item Source retrieval API endpoint authorizes project access but fails to confirm if the requested Source belongs to that specific project. This logical flaw allows authenticated users or project-scoped API key holders to bypass tenant isolation boundaries and retrieve unredacted, plaintext message broker credentials for Apache Kafka, Amazon SQS, RabbitMQ, and Google Cloud Pub/Sub belonging to other tenants. This issue is fully patched in version 26.6.8.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 5 hours ago•CVE-2026-77339
5.1

CVE-2026-77339: Unauthenticated Remote Command Execution in Process Compose via DNS Rebinding

CVE-2026-77339 is a critical security vulnerability in Process Compose before version 1.120.0. The Model Context Protocol (MCP) Server-Sent Events (SSE) listener transport subsystem fails to validate the HTTP Host and Origin headers, and does not enforce authentication. This omissions expose local loopback listeners to DNS rebinding attacks orchestrated by malicious remote websites visited by developers, enabling unauthorized process control and arbitrary command execution.

Alon Barad
Alon Barad
8 views•6 min read
•about 6 hours ago•CVE-2026-77301
7.5

CVE-2026-77301: Uncontrolled Resource Allocation (Decompression Bomb) in adm-zip

CVE-2026-77301 is a critical uncontrolled resource allocation vulnerability in the popular Node.js library adm-zip (versions prior to 0.6.1). During ZIP decompression of asynchronous entries, the library trusts the uncompressed size metadata declared in the central directory headers. Because Node.js's streaming zlib API completely ignores the maxOutputLength configuration, a crafted ZIP archive (decompression bomb) causes the application to continually allocate resident memory buffers on the heap without limits, causing rapid memory exhaustion and a process-level Out-of-Memory (OOM) crash.

Alon Barad
Alon Barad
6 views•5 min read