Findings

CVE-2026-105660

Unvalidated HTTP/1 request-target authority lets a client choose conn.host and conn.port in Bandit

Published Oct 15, 2026 · updated Oct 15, 2026

## Summary Improper Validation of Syntactic Correctness of Input vulnerability in mtrudel bandit allows an unauthenticated remote attacker to set and to values outside the RFC 3986 host grammar via the authority of an HTTP/1 absolute-form or authority-form request target. Bandit validates the header and answers 400 when it is malformed, but when the request target carries its own authority that authority takes precedence, as RFC 9112 requires, and in passes it to the application unchecked. A request line such as with a valid header yields a of , and the same path admits NUL, DEL and non-ASCII bytes, invalid IP literals and ports outside 1..65535. The HTTP/1.0 clause needs no header at all, and places the unparsed port string in . Applications that build absolute URLs from , such as through or Phoenix URL helpers, emit links whose authority the attacker chose. Message framing is unaffected, and no CR or LF can reach . This issue affects bandit: from 0.6.0 before 1.13.0. ## Details **1. Request-target parsing** ( ) returns an absolute-form target as and an authority-form ( ) target as . unwraps both into a tuple and forwards and as received. only rejects bytes at or below and , so userinfo, delimiters, backslashes, bytes to , invalid IP literals and out-of-range ports pass. For , is the unparsed text after the first colon. **2. Host selection** ( ) has three clauses. The HTTP/1.1 clause calls , which parses the header with and raises a 400 on a malformed value, and then discards that result whenever is set, returning and instead. The fallback clause used for HTTP/1.0 and for returns the target host and port directly and never consults the header. The precedence itself follows RFC 9112 section 3.2.2; the defect is that the value which wins is the one never validated. **3. Effect** places the pair into the from which builds and . The application therefore sees host values Bandit rejects on every other route into the same field, and for a binary where promises an integer

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 15, 2026 · GitHub Advisory Database

    Fix available

    bandit fixed in 1.13.0

  2. Oct 15, 2026 · NIST NVD

    Detected

    Improper Validation of Syntactic Correctness of Input vulnerability in mtrudel bandit allows an unauthenticated remote attacker to set conn.host and conn.port to values outside the RFC 3986 host grammar via the authority of an HTTP/1 absolute-form or authority-form request target. Bandit validates the Host header and answers 400 when it is malformed, but when the request target carries its own aut

  3. Oct 15, 2026 · GitHub Advisory Database

    Fix available

    bandit fixed in 1.13.0

Affected

  • Hex bandit0.6.0 → 1.13.0

Sources

  • CVE.orgVulnerability recordCVE-2026-105660

    Official CVE identifier

    cve.org
  • GitHub Advisory DatabasePackage advisoryGHSA-v53v-9hvg-37jf

    GitHub Advisory Database record mirrored by OSV.

    github.com
  • NIST NVDVulnerability recordCVE-2026-105660

    Improper Validation of Syntactic Correctness of Input vulnerability in mtrudel bandit allows an unauthenticated remote attacker to set conn.host and conn.port to values outside the RFC 3986 host grammar via the authority of an HTTP/1 absolute-form or authority-form request target

    nvd.nist.gov
  • OSV.devPackage advisoryEEF-CVE-2026-105660

    Unvalidated HTTP/1 request-target authority lets a client choose conn.host and conn.port in Bandit

    osv.dev

References