{"id":"CVE-2026-39807","published":"2026-05-01T20:34:22Z","modified":"2026-11-20T04:16:01Z","title":"Client-supplied URI scheme trusted without transport verification in bandit","vendor":"mtrudel","product":"bandit","tier":"tail","description":{"text":"Reliance on Untrusted Inputs in a Security Decision vulnerability in mtrudel bandit allows unauthenticated transport-state spoofing on plaintext HTTP connections.\n\nBandit.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.\n\nDownstream 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.\n\nThis issue affects bandit: from 1.0.0-pre.6 before 1.11.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00531,"percentile":0.45828,"provenance":"source"},"cwes":[{"id":"CWE-807","name":"Reliance on Untrusted Inputs in a Security Decision"}],"references":[{"url":"https://github.com/mtrudel/bandit/security/advisories/GHSA-375f-4r2h-f99j","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-39807.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-39807","tags":["related"]},{"url":"https://github.com/mtrudel/bandit/commit/ff2f829326cd5dcf7335939aef9775269d881e28","tags":["related"]},{"url":"https://github.com/mtrudel/bandit/commit/45feea20dea8af7ffd7245271107b695c040e667","tags":["patch"]}],"priority":{"score":13.6,"factors":[{"name":"EPSS percentile","points":9.17},{"name":"CVSS severity","points":4.41}]},"vendorSlug":"mtrudel","affectedVersions":[{"vendor":"mtrudel","product":"bandit","versions":[">= 1.0.0-pre.6, < 1.11.0"]},{"vendor":"mtrudel","product":"bandit","versions":[">= ff2f829326cd5dcf7335939aef9775269d881e28, < 45feea20dea8af7ffd7245271107b695c040e667"]}],"capec":[{"id":"CAPEC-220","name":"Client-Server Protocol Manipulation"}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-05-02T01:17:52.498343Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Hex","package":"bandit","vulnerableRanges":[">=1.0.0, <1.11.0"],"patched":["1.11.0"],"from":["GHSA-375f-4r2h-f99j"],"provenance":"source"}],"summary":{"text":"A flaw in Bandit's Elixir.Bandit.Pipeline determine_scheme/2 function (lib/bandit/pipeline.ex) returns the client-supplied URI scheme without checking the transport's secure? flag, so the request's scheme is taken from attacker-controlled input in HTTP/1.1 absolute-form targets and the HTTP/2 :scheme pseudo-header. An unauthenticated remote client sending requests over a plaintext HTTP connection can declare https, causing Bandit to set conn.scheme to :https even though no TLS was negotiated, which misleads downstream Plug consumers that branch on that value.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:50:26Z"},"euvd":{"id":"EUVD-2026-26714","exploited":false,"provenance":"source"}}