Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.5%top 64%

CVE-2026-39807: CWE-807 Reliance on Untrusted Inputs in a Security Decision in mtrudel bandit

0
Medium
VulnerabilityCVE-2026-39807cvecve-2026-39807cwe-807
Published: Fri May 01 2026 (05/01/2026, 20:34:22 UTC)
Source: CVE Database V5
Vendor/Project: mtrudel
Product: bandit

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.

CVSS v4.0

Score 6.3medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

Affected versions
=1.0.0

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/27/2026, 20:06:12 UTC

Technical Analysis

The vulnerability arises from the function 'Elixir.Bandit.Pipeline':determine_scheme/2, which returns the client-supplied URI scheme verbatim, ignoring whether the transport is actually secure. Attackers can exploit this by sending HTTP/1.1 absolute-form requests or HTTP/2 :scheme pseudo-headers over plaintext TCP connections, causing bandit to incorrectly set conn.scheme to :https. This misrepresentation leads downstream Plug consumers, such as Plug.SSL, to skip necessary HTTPS redirects, send cookies with the secure flag over plaintext, and produce inaccurate audit logs. The flaw is classified as CWE-807 (Reliance on Untrusted Inputs in a Security Decision) and affects bandit versions from 1.0.0 up to but not including 1.11.0.

Potential Impact

An attacker can cause the server and downstream components to believe a plaintext HTTP connection is secure HTTPS, leading to insecure cookie transmission, bypass of HTTPS enforcement mechanisms, and inaccurate security logging. This undermines transport security assumptions and may facilitate further attacks relying on these incorrect security decisions. However, exploitation requires control over the client request and only affects plaintext HTTP connections.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid relying solely on conn.scheme for security decisions on plaintext HTTP connections. Consider additional validation of transport security outside of client-supplied scheme values or enforce TLS to prevent plaintext connections. Monitor vendor communications for updates and patches addressing this issue.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
EEF
Date Reserved
2026-04-07T12:28:54.916Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 69f5124bcbff5d86105840e4

Added to database: 5/1/2026, 8:51:23 PM

Last enriched: 5/27/2026, 8:06:12 PM

Last updated: 6/15/2026, 11:15:15 PM

Views: 88

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses