The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-39807

CVE-2026-39807: Bandit Auth Bypass Vulnerability

CVE-2026-39807 is an authentication bypass flaw in mtrudel bandit that allows transport-state spoofing on plaintext HTTP connections, misleading security decisions. This post covers technical details, affected versions, and mitigations.

Published: May 7, 2026

CVE-2026-39807 Overview

CVE-2026-39807 affects mtrudel/bandit, an HTTP server library for Elixir, in versions 1.0.0 through 1.11.0 (exclusive). The flaw lets an unauthenticated client spoof the connection's transport state on plaintext HTTP. The Elixir.Bandit.Pipeline.determine_scheme/2 function in lib/bandit/pipeline.ex returns the client-supplied URI scheme verbatim and ignores the transport's secure? flag. Attackers can send an HTTP/1.1 absolute-form target such as GET https://victim/path HTTP/1.1 or set the HTTP/2 :scheme pseudo-header to https over a plain TCP connection. Bandit then sets conn.scheme = :https, misleading downstream Plug consumers. The weakness maps to [CWE-807].

Critical Impact

Downstream Plug components branching on conn.scheme skip HTTP→HTTPS redirects, emit secure: true cookies over plaintext, log requests as HTTPS, and can make incorrect CSRF or SameSite decisions.

Affected Products

  • mtrudel bandit versions >= 1.0.0 and < 1.11.0
  • Elixir/Plug applications relying on conn.scheme for security decisions
  • HTTP/1.1 and HTTP/2 endpoints served by vulnerable Bandit releases

Discovery Timeline

  • 2026-05-01 - CVE-2026-39807 published to NVD
  • 2026-05-05 - Last updated in NVD database

Technical Details for CVE-2026-39807

Vulnerability Analysis

Bandit's request pipeline builds the Plug.Conn URI by calling determine_scheme/2. The original implementation prefers the scheme supplied by the client over the actual transport state. When the client omits a scheme, the function falls back to secure?. When the client supplies one, the function returns it unchanged. This trust placement violates the security decision model required when deriving transport identity. The vulnerability is classified under [CWE-807] (Reliance on Untrusted Inputs in a Security Decision).

Root Cause

The root cause lives in lib/bandit/pipeline.ex. The function signature determine_scheme(secure?, {scheme, _, _, _}) uses pattern matching that returns the attacker-controlled scheme whenever it is non-nil. HTTP/1.1 absolute-form request targets and the HTTP/2 :scheme pseudo-header both populate that field with untrusted input. The transport's authoritative secure? boolean is consulted only when the client omits the value.

Attack Vector

An unauthenticated remote attacker opens a plaintext TCP connection to the Bandit server. Over HTTP/1.1, the attacker issues an absolute-form request line such as GET https://victim/path HTTP/1.1. Over HTTP/2, the attacker sets the :scheme pseudo-header to https. Bandit assigns conn.scheme = :https, and any Plug middleware that branches on the scheme treats the plaintext request as TLS-secured. Plug.SSL skips its redirect, cookies marked secure: true traverse cleartext, and audit logs record HTTPS access.

text
# Patch in lib/bandit/pipeline.ex
         ) :: Plug.Conn.t()
   defp build_conn!(transport, method, request_target, headers, {secure?, peer_address}, opts) do
     adapter = Bandit.Adapter.init(self(), transport, method, headers, opts)
-    scheme = determine_scheme(secure?, request_target)
+    scheme = determine_scheme(secure?)
     version = Bandit.HTTPTransport.version(transport)
     {host, port} = determine_host_and_port!(scheme, version, request_target, headers)
     {path, query} = determine_path_and_query(request_target)
     uri = %URI{scheme: scheme, host: host, port: port, path: path, query: query}
     Plug.Conn.Adapter.conn({Bandit.Adapter, adapter}, method, uri, peer_address, headers)
   end

-  @spec determine_scheme(boolean(), request_target()) :: String.t() | nil
-  defp determine_scheme(secure?, {scheme, _, _, _}) do
-    case {secure?, scheme} do
-      {true, nil} -> "https"
-      {false, nil} -> "http"
-      {_, scheme} -> scheme
-    end
-  end
+  @spec determine_scheme(boolean()) :: String.t()
+  defp determine_scheme(true), do: "https"
+  defp determine_scheme(false), do: "http"

Source: GitHub Commit 45feea2. The fix removes the client-controlled scheme parameter and derives the value solely from the transport's secure? flag.

Detection Methods for CVE-2026-39807

Indicators of Compromise

  • HTTP/1.1 requests on plaintext listeners with absolute-form targets that begin with https:// (for example GET https://host/path HTTP/1.1).
  • HTTP/2 requests on plaintext listeners carrying a :scheme pseudo-header value of https.
  • Cookies with the Secure attribute observed in unencrypted packet captures of traffic to Bandit endpoints.
  • Application audit logs recording scheme=https for connections whose listener port serves cleartext.

Detection Strategies

  • Inspect Bandit access logs and Plug telemetry events for mismatches between the listening port's TLS state and the recorded conn.scheme.
  • Run network sensors that flag absolute-form HTTP/1.1 request lines arriving on non-TLS sockets.
  • Decode HTTP/2 frames on plaintext listeners and alert when :scheme equals https.

Monitoring Recommendations

  • Forward web server, reverse proxy, and Plug telemetry to a centralized analytics platform and correlate by listener port versus reported scheme.
  • Track issuance of Set-Cookie headers with the Secure flag on plaintext sockets as a high-fidelity signal of exploitation.
  • Alert on Plug.SSL traversals where the redirect path was bypassed for clients that did not negotiate TLS.

How to Mitigate CVE-2026-39807

Immediate Actions Required

  • Upgrade mtrudel/bandit to version 1.11.0 or later in all Elixir applications using the library.
  • Audit deployments for plaintext Bandit listeners that are exposed to untrusted networks.
  • Review application logs for prior requests where conn.scheme was https on plaintext-only ports.

Patch Information

The maintainer fixed the issue in Bandit 1.11.0 via commit 45feea20dea8af7ffd7245271107b695c040e667. The patch redefines determine_scheme/1 to take only the transport secure? boolean, eliminating reliance on the client-supplied scheme. Refer to the GitHub Security Advisory GHSA-375f-4r2h-f99j, the CNA advisory at erlef.org, and the OSV record EEF-CVE-2026-39807.

Workarounds

  • Terminate TLS at an upstream proxy and force conn.scheme based on a trusted header set by that proxy rather than Bandit's pipeline.
  • Restrict Bandit's plaintext listener to localhost or an internal segment so untrusted clients cannot reach it directly.
  • Add a Plug early in the pipeline that overrides conn.scheme using the listener's transport state until the upgrade is applied.
bash
# Update bandit dependency in mix.exs to the patched release
# mix.exs
# defp deps do
#   [{:bandit, "~> 1.11"}]
# end
mix deps.update bandit
mix deps.get
mix compile

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechBandit

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-807
  • Technical References
  • CNA CVE-2026-39807

  • GitHub Commit Note

  • GitHub Security Advisory GHSA-375f

  • OSV Vulnerability EEF-CVE-2026-39807
  • Related CVEs
  • CVE-2026-42786: Bandit WebSocket DoS Vulnerability

  • CVE-2026-42788: Bandit HTTP/2 Frame DoS Vulnerability

  • CVE-2026-39804: Bandit WebSocket Compression DoS Vulnerability

  • CVE-2026-39805: Bandit HTTP Request Smuggling Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English