May 7, 2026·4 min read·29 visits
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.
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.
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.
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
endCommit 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 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.internalBandit processes this payload and populates the Plug.Conn struct with scheme: :https. The connection proceeds through the application pipeline possessing a falsified security context.
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.
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.
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| Product | Affected Versions | Fixed Version |
|---|---|---|
bandit mtrudel | >= 1.0.0, < 1.11.0 | 1.11.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-807 |
| Attack Vector | Network |
| CVSS Score | 6.3 |
| EPSS Score | 0.00018 |
| Impact | Security feature bypass and confidentiality loss |
| Exploit Status | Proof of Concept |
| KEV Status | Not Listed |
The system makes a security decision based on input from an untrusted source, which can be modified by an attacker.
CVE-2026-70493 is a critical Regular Expression Denial of Service (ReDoS) vulnerability affecting Open WebUI from version 0.9.6 up to (but excluding) 0.11.0. An authenticated user can submit a custom, highly complex regular expression pattern to search files within the knowledge base. Because these expressions are compiled and executed synchronously using Python's standard backtracking re module inside an asynchronous event loop, the server becomes unresponsive. A single request is capable of stalling the entire platform, denying access to all concurrent users of the system.
CVE-2026-70588 is a stored Cross-Site Scripting (XSS) vulnerability in Ghost CMS versions 5.26.0 through 6.54.0. The vulnerability exists within the Universal Import feature of the Ghost Admin interface. When processing imported content from third-party platforms such as Revue, the importer fails to sanitize user-controlled HTML tags, rich-text structured JSON, or link fields before rendering them in the Ghost Admin panel and front-end template rendering contexts.
CVE-2026-53948 is a stored cross-site scripting (XSS) vulnerability in the Ghost content management system. Affected versions (v6.19.4 up to v6.21.0) trusted the client-supplied Content-Type header during file uploads via the Admin API. This allowed authenticated attackers to upload benignly-named files with executable MIME types (like text/html), executing scripts in visitor browsers when hosted on integrated cloud platforms like S3 or GCS.
A business logic vulnerability in Ghost CMS allows unauthenticated remote users to redeem deactivated or archived promotional subscription offers by programmatically passing old offer identifiers during the checkout session initialization.
A Server-Side Request Forgery (SSRF) vulnerability exists in the Ghost content management system from version 6.0.9 up to, but not including, 6.21.1. The flaw resides in the 'request-external.js' module, where the IP address validation blocklist fails to account for fully expanded IPv4-mapped IPv6 formats. This allows unauthenticated remote attackers to bypass the private IP filter and initiate unauthorized connections to loopback services, internal subnets, or cloud instance metadata endpoints.
Ghost CMS is vulnerable to Server-Side Request Forgery (SSRF) in versions 6.0.9 through 6.21.1. Due to a Time-of-Check to Time-of-Use (TOCTOU) race condition in its outbound fetch validation logic, an attacker can bypass IP blocklists via DNS Rebinding. This allows unauthorized interaction with private networks and local services.