Impact
Bandit incorrectly trusts client‑supplied URI schemes, ignoring whether the underlying transport is secure. This allows an attacker to forge HTTPS in a request sent over plain HTTP, causing the framework to assume a secure connection. Consequently, downstream plugs that inspect conn.scheme are misled: Plug.SSL may skip redirect, secure cookies can be sent over an unsecured channel, audit logs show HTTPS while the traffic is not encrypted, and CSRF/SameSite checks may be bypassed. The flaw is a CWE‑807 vulnerability (Incomplete Input Validation).
Affected Systems
The vulnerability exists in the bandit HTTP server package maintained by mtrudel. Versions from 1.0.0 up to but not including 1.11.0 are affected. Developers should check the installation version and update accordingly.
Risk and Exploitability
The CVSS score of 6.3 reflects a moderate to high severity. The EPSS score is unavailable, and the issue is not listed in the CISA KEV catalog. Attackers can exploit the flaw remotely over any plaintext HTTP connection by sending a request with an https scheme or an HTTP/2 :scheme header. The exploitation can lead to insecure credential handling, potential CSRF attacks, and incorrect log entries.
OpenCVE Enrichment