# CVE-2026-39807: Client-supplied URI scheme trusted without transport verification in bandit

- Severity: Medium 6.3 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 44% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-01T20:34:22.832Z
- Modified: 2026-11-25T17:23:06.576Z
- Also known as: GHSA-375f-4r2h-f99j, EEF-CVE-2026-39807
- Weaknesses: CWE-807
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: EEF

## Description

Reliance on Untrusted Inputs in a Security Decision vulnerability in mtrudel bandit allows unauthenticated transport-state spoofing on plaintext HTTP connections.

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-pre.6 before 1.11.0.

(As written by CVE List.)

## Affected

- bandit: from 1.0.0-pre.6 before 1.11.0
- mtrudel/bandit: from ff2f829326cd5dcf7335939aef9775269d881e28 before 45feea20dea8af7ffd7245271107b695c040e667
- bandit (Hex): from 1.0.0 before 1.11.0; from 1.0.0-pre.6 before 1.11.0
- https://github.com/mtrudel/bandit: from ff2f829326cd5dcf7335939aef9775269d881e28 before 45feea20dea8af7ffd7245271107b695c040e667

## Every score

- EEF: CVSS:4.0 6.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://github.com/mtrudel/bandit/security/advisories/GHSA-375f-4r2h-f99j> (exploit, advisory, related, vendor-advisory, web)
- <https://cna.erlef.org/cves/CVE-2026-39807.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-39807> (related, web)
- <https://github.com/mtrudel/bandit/commit/ff2f829326cd5dcf7335939aef9775269d881e28> (related, web)
- <https://github.com/mtrudel/bandit/commit/45feea20dea8af7ffd7245271107b695c040e667> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-39807> (advisory)
- <https://github.com/mtrudel/bandit> (package)
- <https://hex.pm/packages/bandit> (package)

## Sources

- CVE List: [CVE-2026-39807](https://www.cve.org/CVERecord?id=CVE-2026-39807), CVE Terms of Use, modified 2026-11-20
- GitHub Advisory Database: [GHSA-375f-4r2h-f99j](https://github.com/advisories/GHSA-375f-4r2h-f99j), CC-BY-4.0, modified 2026-05-07
- Erlang Ecosystem Foundation: [EEF-CVE-2026-39807](https://osv.dev/vulnerability/EEF-CVE-2026-39807), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-39807](https://nvd.nist.gov/vuln/detail/CVE-2026-39807), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-39807 · Whole record: https://cve.day/CVE-2026-39807.json · Rebuilt by cve.day 2026-11-25T22:59:20.438Z
