# CVE-2026-105660: Unvalidated HTTP/1 request-target authority lets a client choose conn.host and conn.port in Bandit

> Attackers can spoof host and port values in HTTP requests, causing applications to generate malicious URLs or bypass host-based security checks.

- **Severity:** Medium 6.9 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Oct 2026
- **Updated:** 16 Oct 2026
- **Also known as:** EEF-CVE-2026-105660, GHSA-v53v-9hvg-37jf

## What is CVE-2026-105660?

CVE-2026-105660 is a medium-severity vulnerability in mtrudel bandit, published on 15 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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 authority that authority takes precedence, as RFC 9112 requires, and Bandit.Pipeline.determine_host_and_port!/4 in lib/bandit/pipeline.ex passes it to the application unchecked. A request line such as GET http://good.example@evil.example/x HTTP/1.1 with a valid Host header yields a conn.host of good.example@evil.example, 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 Host header at all, and CONNECT places the unparsed port string in conn.port.

Applications that build absolute URLs from conn.host, such as through Plug.Conn.request_url/1 or Phoenix URL helpers, emit links whose authority the attacker chose. Message framing is unaffected, and no CR or LF can reach conn.host.

This issue affects bandit: from 0.6.0 before 1.13.0.

Weakness: CWE-1286 (Improper Validation of Syntactic Correctness of Input)

## Which versions are affected by CVE-2026-105660?

1 open source package ship an affected version, including bandit.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bandit` | Hex | From 0.6.0 | 1.13.0 |

## How do I fix CVE-2026-105660?

Upgrade bandit to 1.13.0 or later.

## Is CVE-2026-105660 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-105660 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-105660 and fix it if it is affected.

What it is: CVE-2026-105660 is a medium-severity vulnerability in mtrudel bandit, published on 15 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-105660 exists.

Affected packages and fixed versions:
- bandit (Hex): affected from 0.6.0; fixed in 1.13.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-105660/ (Markdown: https://insights.sbomify.com/CVE-2026-105660/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-105660
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-105660
- OSV: https://osv.dev/vulnerability/CVE-2026-105660

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-105660/
Summaries are generated and may contain mistakes; the official description above is the record.
