CVE-2026-55458
Caddy: RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through
Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.5, the reverse proxy's finalizeResponse method in modules/caddyhttp/reverseproxy/reverseproxy.go handles an upstream 101 Switching Protocols response before running removeConnectionHeaders and the hopHeaders deletion loop used for ordinary responses. The early return invokes handleUpgradeResponse, which copies the upstream headers to the client and normalizes only WebSocket-specific header names. An attacker who controls or compromises a proxied WebSocket upstream can therefore cause hop-by-hop headers such as Alt-Svc, Keep-Alive, and Proxy-Authenticate, as well as headers named by Connection, to cross the proxy boundary. For HTTP/2 or HTTP/3 extended CONNECT, the upstream 101 response may be represented to the client as an ordinary successful response, increasing the chance that leaked headers are processed. This issue is fixed in version 2.11.5.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
2.9
Caddy: RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through
Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.5, the reverse proxy's finalizeResponse method in modules/caddyhttp/reverseproxy/reverseproxy.go handles an upstream 101 Switching Protocols response before running removeConnectionHeaders and the hopHeaders deletion loop used for ordinary responses. The early return invokes handleUpgradeResponse, which copies the upstream headers to the client and normalizes only WebSocket-specific header names. An attacker who controls or compromises a proxied WebSocket upstream can therefore cause hop-by-hop headers such as Alt-Svc, Keep-Alive, and Proxy-Authenticate, as well as headers named by Connection, to cross the proxy boundary. For HTTP/2 or HTTP/3 extended CONNECT, the upstream 101 response may be represented to the client as an ordinary successful response, increasing the chance that leaked headers are processed. This issue is fixed in version 2.11.5.
- Record
CVE-2026-55458- CVSS 4.0
- 2.9 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P - Weakness
- CWE-444
- Updated
- 2026-11-05
EUVDEUVD-2026-117782
2.9
Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.5, the reverse proxy's finalizeResponse method in modules/caddyhttp/reverseproxy/reverseproxy.go handles an upstream 101 Switching Protocols response before running removeConnectionHeaders and the hopHeaders deletion loop used for ordinary responses. The early return invokes handleUpgradeResponse, which copies the upstream headers to the client and normalizes only WebSocket-specific header names. An attacker who controls or compromises a proxied WebSocket upstream can therefore cause hop-by-hop headers such as Alt-Svc, Keep-Alive, and Proxy-Authenticate, as well as headers named by Connection, to cross the proxy boundary. For HTTP/2 or HTTP/3 extended CONNECT, the upstream 101 response may be represented to the client as an ordinary successful response, increasing the chance that leaked headers are processed. This issue is fixed in version 2.11.5.
- Record
EUVD-2026-117782- CVSS 4.0
- 2.9 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P - Updated
- 2026-11-05
GitHub AdvisoriesGHSA-8qx7-j2v2-x6q5
2.9
Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through
AI Disclosure
This vulnerability was discovered via deepseek-v4-pro[1m] for finding potential vulnerabilities / inconsistencies in the code base. I made the AI check if Caddy is compliant with various RFCs, incl. 7230. I also used it to help write the PoC, since it was honestly much faster than writing it by hand. I also let it write parts of this advisory text for brevity's sake, but had to rewrite half of it by hand.
Summary
Caddy's reverse proxy fails to strip RFC 7230 hop-by-hop headers from upstream responses when handling WebSocket upgrades (HTTP 101 Switching Protocols). Headers including Alt-Svc, Keep-Alive, Proxy-Authenticate, Transfer-Encoding, or Trailer, which Caddy actually correctly strips for normal HTTP responses, pass through unfiltered to the client during protocol upgrades. An upstream that sets these headers (intentionally or otherwise) can inject them into client responses, enabling connection hijacking via Alt-Svc, cookie injection via Set-Cookie, and proxy authentication phishing.
The normal response path in finalizeResponse correctly strips all hop-by-hop headers before forwarding, but the 101 code path returns early, skipping the stripping entirely.
Details
In modules/caddyhttp/reverseproxy/reverseproxy.go, the finalizeResponse method (line 1178) handles upstream responses. For all normal responses, it strips hop-by-hop headers before copying to the client:
// reverseproxy.go:1194-1198
removeConnectionHeaders(res.Header)
for _, h := range hopHeaders {
res.Header.Del(h)
}
However, the 101 Switching Protocols check at line 1187 returns before this stripping code:
// reverseproxy.go:1186-1192
if res.StatusCode == http.StatusSwitchingProtocols {
var wg sync.WaitGroup
h.handleUpgradeResponse(logger, &wg, rw, req, res)
wg.Wait()
return nil // <-- returns BEFORE removeConnectionHeaders and hopHeaders loop
}
Inside handleUpgradeResponse (streaming.go:60-91), all upstream response headers are copied to the client without any hop-by-hop filtering:
// streaming.go:88-91
copyHeader(rw.Header(), res.Header) // copies ALL upstream headers
normalizeWebsocketHeaders(rw.Header()) // only remaps Sec-WebSocket-* keys
The normalizeWebsocketHeaders function (line 714) only handles WebSocket-specific header key mapping (Sec-Websocket-* to Sec-WebSocket-*). It does not strip hop-by-hop headers.
Hop-by-Hop Headers That Leak Through
Defined at reverseproxy.go:1681-1692:
Alt-Svc, Connection, Proxy-Connection, Keep-Alive, Proxy-Authenticate,
Proxy-Authorization, Te, Trailer, Transfer-Encoding, Upgrade
All 10 are stripped from normal responses. None are stripped from WebSocket upgrade responses.
For HTTP/2 and HTTP/3 WebSocket connections (extended CONNECT with :protocol: websocket), Caddy converts the upstream's 101 into a 200 OK for the client (streaming.go:99-104). The leaked headers arrive in a standard HTTP 200 response that browsers fully process, making Alt-Svc hijacking and Set-Cookie injection practically exploitable.
Normal (200): removeConnectionHeaders() runs, hopHeaders loop runs -> headers stripped
Upgrade (101): handleUpgradeResponse() runs, returns early -> headers are NOT stripped
This is the only response code path in the reverse proxy that bypasses hop-by-hop header stripping.
PoC
Caddy config:
:8080 {
reverse_proxy localhost:8083
}
Script:
import socket
UPSTREAM = (
b"HTTP/1.1 101 Switching Protocols\r\n"
b"Upgrade: websocket\r\n"
b"Connection: Upgrade\r\n"
b"Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
b"Alt-Svc: h2=\"attacker.example.com:443\"; ma=86400\r\n"
b"Keep-Alive: timeout=999\r\n"
b"Proxy-Authenticate: Basic realm=\"phish\"\r\n"
b"Set-Cookie: injected=malicious; Path=/\r\n"
b"\r\n"
)
s = socket.socket()
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)…
- Record
GHSA-8qx7-j2v2-x6q5- CVSS 4.0
- 2.9 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P - Weakness
- CWE-444
- Updated
- 2026-11-02
NVD
2.9
Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.5, the reverse proxy's finalizeResponse method in modules/caddyhttp/reverseproxy/reverseproxy.go handles an upstream 101 Switching Protocols response before running removeConnectionHeaders and the hopHeaders deletion loop used for ordinary responses. The early return invokes handleUpgradeResponse, which copies the upstream headers to the client and normalizes only WebSocket-specific header names. An attacker who controls or compromises a proxied WebSocket upstream can therefore cause hop-by-hop headers such as Alt-Svc, Keep-Alive, and Proxy-Authenticate, as well as headers named by Connection, to cross the proxy boundary. For HTTP/2 or HTTP/3 extended CONNECT, the upstream 101 response may be represented to the client as an ordinary successful response, increasing the chance that leaked headers are processed. This issue is fixed in version 2.11.5.
- Record
CVE-2026-55458- CVSS 4.0
- 2.9 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-444
- Updated
- 2026-11-05
OSV
2.9
Caddy: RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through
Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.5, the reverse proxy's finalizeResponse method in modules/caddyhttp/reverseproxy/reverseproxy.go handles an upstream 101 Switching Protocols response before running removeConnectionHeaders and the hopHeaders deletion loop used for ordinary responses. The early return invokes handleUpgradeResponse, which copies the upstream headers to the client and normalizes only WebSocket-specific header names. An attacker who controls or compromises a proxied WebSocket upstream can therefore cause hop-by-hop headers such as Alt-Svc, Keep-Alive, and Proxy-Authenticate, as well as headers named by Connection, to cross the proxy boundary. For HTTP/2 or HTTP/3 extended CONNECT, the upstream 101 response may be represented to the client as an ordinary successful response, increasing the chance that leaked headers are processed. This issue is fixed in version 2.11.5.
- Record
CVE-2026-55458- CVSS 4.0
- 2.9 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P - Weakness
- CWE-444
- Updated
- 2026-11-07
OSVDEBIAN-CVE-2026-55458
2.9
Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.5, the reverse proxy's finalizeResponse method in modules/caddyhttp/reverseproxy/reverseproxy.go handles an upstream 101 Switching Protocols response before running removeConnectionHeaders and the hopHeaders deletion loop used for ordinary responses. The early return invokes handleUpgradeResponse, which copies the upstream headers to the client and normalizes only WebSocket-specific header names. An attacker who controls or compromises a proxied WebSocket upstream can therefore cause hop-by-hop headers such as Alt-Svc, Keep-Alive, and Proxy-Authenticate, as well as headers named by Connection, to cross the proxy boundary. For HTTP/2 or HTTP/3 extended CONNECT, the upstream 101 response may be represented to the client as an ordinary successful response, increasing the chance that leaked headers are processed. This issue is fixed in version 2.11.5.
- Record
DEBIAN-CVE-2026-55458- CVSS 4.0
- 2.9 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-06
OSVGHSA-8qx7-j2v2-x6q5
2.9
Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through
AI Disclosure
This vulnerability was discovered via deepseek-v4-pro[1m] for finding potential vulnerabilities / inconsistencies in the code base. I made the AI check if Caddy is compliant with various RFCs, incl. 7230. I also used it to help write the PoC, since it was honestly much faster than writing it by hand. I also let it write parts of this advisory text for brevity's sake, but had to rewrite half of it by hand.
Summary
Caddy's reverse proxy fails to strip RFC 7230 hop-by-hop headers from upstream responses when handling WebSocket upgrades (HTTP 101 Switching Protocols). Headers including Alt-Svc, Keep-Alive, Proxy-Authenticate, Transfer-Encoding, or Trailer, which Caddy actually correctly strips for normal HTTP responses, pass through unfiltered to the client during protocol upgrades. An upstream that sets these headers (intentionally or otherwise) can inject them into client responses, enabling connection hijacking via Alt-Svc, cookie injection via Set-Cookie, and proxy authentication phishing.
The normal response path in finalizeResponse correctly strips all hop-by-hop headers before forwarding, but the 101 code path returns early, skipping the stripping entirely.
Details
In modules/caddyhttp/reverseproxy/reverseproxy.go, the finalizeResponse method (line 1178) handles upstream responses. For all normal responses, it strips hop-by-hop headers before copying to the client:
// reverseproxy.go:1194-1198
removeConnectionHeaders(res.Header)
for _, h := range hopHeaders {
res.Header.Del(h)
}
However, the 101 Switching Protocols check at line 1187 returns before this stripping code:
// reverseproxy.go:1186-1192
if res.StatusCode == http.StatusSwitchingProtocols {
var wg sync.WaitGroup
h.handleUpgradeResponse(logger, &wg, rw, req, res)
wg.Wait()
return nil // <-- returns BEFORE removeConnectionHeaders and hopHeaders loop
}
Inside handleUpgradeResponse (streaming.go:60-91), all upstream response headers are copied to the client without any hop-by-hop filtering:
// streaming.go:88-91
copyHeader(rw.Header(), res.Header) // copies ALL upstream headers
normalizeWebsocketHeaders(rw.Header()) // only remaps Sec-WebSocket-* keys
The normalizeWebsocketHeaders function (line 714) only handles WebSocket-specific header key mapping (Sec-Websocket-* to Sec-WebSocket-*). It does not strip hop-by-hop headers.
Hop-by-Hop Headers That Leak Through
Defined at reverseproxy.go:1681-1692:
Alt-Svc, Connection, Proxy-Connection, Keep-Alive, Proxy-Authenticate,
Proxy-Authorization, Te, Trailer, Transfer-Encoding, Upgrade
All 10 are stripped from normal responses. None are stripped from WebSocket upgrade responses.
For HTTP/2 and HTTP/3 WebSocket connections (extended CONNECT with :protocol: websocket), Caddy converts the upstream's 101 into a 200 OK for the client (streaming.go:99-104). The leaked headers arrive in a standard HTTP 200 response that browsers fully process, making Alt-Svc hijacking and Set-Cookie injection practically exploitable.
Normal (200): removeConnectionHeaders() runs, hopHeaders loop runs -> headers stripped
Upgrade (101): handleUpgradeResponse() runs, returns early -> headers are NOT stripped
This is the only response code path in the reverse proxy that bypasses hop-by-hop header stripping.
PoC
Caddy config:
:8080 {
reverse_proxy localhost:8083
}
Script:
import socket
UPSTREAM = (
b"HTTP/1.1 101 Switching Protocols\r\n"
b"Upgrade: websocket\r\n"
b"Connection: Upgrade\r\n"
b"Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
b"Alt-Svc: h2=\"attacker.example.com:443\"; ma=86400\r\n"
b"Keep-Alive: timeout=999\r\n"
b"Proxy-Authenticate: Basic realm=\"phish\"\r\n"
b"Set-Cookie: injected=malicious; Path=/\r\n"
b"\r\n"
)
s = socket.socket()
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)…
- Record
GHSA-8qx7-j2v2-x6q5- CVSS 4.0
- 2.9 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P - Weakness
- CWE-444
- Updated
- 2026-11-06
OSVUBUNTU-CVE-2026-55458
2.9
Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.5, the reverse proxy's finalizeResponse method in modules/caddyhttp/reverseproxy/reverseproxy.go handles an upstream 101 Switching Protocols response before running removeConnectionHeaders and the hopHeaders deletion loop used for ordinary responses. The early return invokes handleUpgradeResponse, which copies the upstream headers to the client and normalizes only WebSocket-specific header names. An attacker who controls or compromises a proxied WebSocket upstream can therefore cause hop-by-hop headers such as Alt-Svc, Keep-Alive, and Proxy-Authenticate, as well as headers named by Connection, to cross the proxy boundary. For HTTP/2 or HTTP/3 extended CONNECT, the upstream 101 response may be represented to the client as an ordinary successful response, increasing the chance that leaked headers are processed. This issue is fixed in version 2.11.5.
- Record
UBUNTU-CVE-2026-55458- CVSS 4.0
- 2.9 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P - Updated
- 2026-11-07
OSVGO-2026-6874 No score
Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through in github.com/caddyserver/caddy
Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through in github.com/caddyserver/caddy
- Record
GO-2026-6874- Updated
- 2026-11-06
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/caddyserver/caddy/v2Go |
through 2.11.4 | 2.11.5 |
caddyDebian:12 |
All versions, plus listed versions 2.11.2-12.11.2-1~bpo13+12.11.4-12.6.2-102.6.2-11 Show 10 moreShow less2.6.2-122.6.2-132.6.2-142.6.2-52.6.2-5+deb12u12.6.2-62.6.2-6.12.6.2-72.6.2-82.6.2-9 |
None known |
caddyDebian:13 |
All versions, plus listed versions 2.11.2-12.11.2-1~bpo13+12.11.4-12.6.2-122.6.2-12+deb13u12.6.2-132.6.2-14 |
None known |
caddyDebian:14 |
All versions, plus listed versions 2.11.2-12.11.2-1~bpo13+12.11.4-12.6.2-122.6.2-132.6.2-14 |
None known |
github.com/caddyserver/caddy/v2Go |
before 2.11.5 | 2.11.5 |
caddyUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 2.6.2-62.6.2-6ubuntu0.24.04.12.6.2-6ubuntu0.24.04.22.6.2-6ubuntu0.24.04.2+esm12.6.2-6ubuntu0.24.04.32.6.2-6ubuntu0.24.04.3+esm12.6.2-6ubuntu0.24.04.3+esm2 |
None known |
caddyUbuntu:26.10 |
All versions, plus listed versions 2.6.2-142.11.4-1 |
None known |
caddyUbuntu:Pro:26.04:LTS |
All versions, plus listed versions 2.6.2-122.6.2-142.6.2-14ubuntu0.26.04.1~esm1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, references | OSV | |
| affected, aliases, references | OSV | |
| references | OSV | |
| affected, aliases, references | NVD, OSV | |
| aliases | EUVD | |
| description, facts, products, references, severity, title | CVE List | |
| first indexed | GitHub Advisories, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-55458 is a low vulnerability (CVSS 2.9) in Caddyserver Caddy, published October 28, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.50%, the 42nd percentile. Fixed in github.com/caddyserver/caddy/v2 2.11.5.
References
github.com/caddyserver/caddy/security/advisories/GHSA-8qx7-j2v2-x6q5
github.com/caddyserver/caddy/commit/25b3eab6dbd8d2d2670711f26b774e0fd43e1179
github.com/caddyserver/caddy/releases/tag/v2.11.5
github.com/advisories/GHSA-8qx7-j2v2-x6q5
github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55458.json
nvd.nist.gov/vuln/detail/CVE-2026-55458
Left out here: the rest of 2 source descriptions. The JSON record has them.