github.com/labstack/echo/v5
High performance, minimalist Go web framework
Activity
- Latest release
- 6d ago
- Total releases
- 14
- Cadence
- ~10 days
- Last 12 months
- 14
Reach
- Stars
- 32.8k
Details
- First release
- Jan 18, 2026
| Version | Released | |
|---|---|---|
v5.4.2
patch
|
v5.4.2
patch
Dependencies (3)
|
|
v5.4.1
patch
|
v5.4.1
patch
Dependencies (3)
|
|
v5.4.0
minor
4 CVEs
CVE-2026-118265
GHSA-h53f-rm2w-w7rg
Oct 23, 2026
Echo: X-Real-IP extractor trusts the header value instead of the sending peer
5.3
/ 10
Medium
Network
Low
None
None
Unchanged
None
Low
None
ImpactIn Echo v5, Applications using this extractor for IP allowlists, IP-based rate limiting, audit logs or forwarding headers could accept a spoofed client identity. Exploitation requires that the attacker can reach Echo directly or that an intervening proxy passes through the attacker's Affected versions and patchAll v5 releases from v5.0.0 through v5.4.0 are affected. Upgrade to v5.4.1. The patch validates the direct peer before accepting a syntactically valid WorkaroundsUse CreditsReported and patched by @rm-Umar. @Duodum independently reported the same issue in GHSA-c3r7-8j36-7mx8, which is tracked as a duplicate of this advisory. Fixed in
5.4.1
References Updated Oct 28, 2026 · Source: OSV.dev
CVE-2026-118262
GHSA-9969-6676-49h5
Oct 23, 2026
Echo: WebSocket proxy can retain connections and handlers after client disconnect
High
Network
Low
None
None
ImpactEcho's Proxy middleware could retain a handler, copy goroutines and network connections after a WebSocket client disconnected if the upstream kept its connection open. The raw proxy waited for both copy directions to finish without reliably closing the other connection when one direction ended. Rejected upgrade responses with HTTP keep-alive were one way to trigger this behavior. Repeated connections can accumulate resources and cause denial of service. The impact depends on the proxy route's accessibility, upstream behavior and configured connection deadlines. This is a medium-severity resource-retention issue; no confidentiality or integrity impact is claimed. Affected versions and patchAffected versions are v4.15.0 through v4.16.0 and v5.0.0 through v5.4.0. The regression was introduced by commit e2133320c7, merged in #2852. Upgrade to v4.16.1 or v5.4.1. The patch uses Go's HTTP reverse proxy, preserves ordinary HTTP handling for rejected upgrades, and closes both sides of a WebSocket tunnel when either direction ends. It also covers an upstream that receives client EOF but deliberately keeps its side open. WorkaroundsDisable WebSocket proxy routes until upgrading, or apply bounded connection lifetimes and resource limits at the frontend and upstream. Server idle timeouts alone may not cover hijacked WebSocket connections. CreditsReported by @irisitymichaelgrundberg. Fixed in
5.4.1
References
Updated Oct 28, 2026 · Source: OSV.dev
CVE-2026-118264
GHSA-cxf3-9h37-7rr8
Oct 23, 2026
Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls
Critical
Network
Low
None
None
ImpactEcho's Proxy middleware selected a raw tunnel when the client requested a WebSocket upgrade, before validating whether the configured upstream accepted it. If the upstream returned an ordinary HTTP response and kept the connection alive, subsequent HTTP requests on that connection were forwarded directly to the same upstream without passing through Echo's router or route-specific middleware. This can bypass authentication or authorization enforced only at Echo's routes. Exploitation requires an accessible proxy route, an upstream that rejects the upgrade without closing the connection, and a target resource on that upstream without independent authorization. The issue does not provide arbitrary-host proxying or bypass the upstream's own authentication. Affected versions and patchThe raw proxy implementation is present throughout the v4 and v5 release lines up to v4.16.0 and v5.4.0. Runtime reproductions confirmed v4.15.0, v4.16.0, v5.0.0 and v5.4.0; source history also shows the missing upgrade-response validation in v4.0.0. Upgrade to v4.16.1 or v5.4.1. The patch routes WebSocket upgrades through Go's HTTP reverse proxy and enters a tunnel only after a valid upstream upgrade response. Rejected upgrades remain ordinary HTTP requests. WorkaroundsReject WebSocket upgrade requests before they reach affected Echo proxy routes, or enforce authorization independently at every upstream resource. Merely returning a non-101 response from the upstream does not prevent the vulnerable raw tunnel. CreditsReported by @Duodum. Fixed in
5.4.1
References
Updated Oct 28, 2026 · Source: OSV.dev
CVE-2026-118263
GHSA-x9ff-22gv-65f4
Oct 23, 2026
Echo: BodyDump can discard BodyLimit overflow errors for unknown-length requests
Medium
Network
Low
None
None
ImpactEcho v5's BodyDump middleware captured a bounded prefix, drained the remaining request body while ignoring read errors, and then replaced the body with the captured prefix. With an outer BodyLimit, an unknown-length request such as an HTTP/1.1 chunked request, and a BodyDump capture limit below the BodyLimit threshold, an overflow detected during that drain could be discarded. The handler could consequently process a truncated request and return success even though the original body exceeded the configured limit. This is a conditional size-policy bypass; no general authentication bypass, production data modification or denial of service is claimed. Known-length requests rejected before BodyDump runs are unaffected by this path. Affected versions and patchAll v5 releases from v5.0.0 through v5.4.0 contain the affected drain-and-replace logic. Runtime reproduction confirmed v5.4.0; source comparison confirms the same request handling in v5.0.0. Upgrade to v5.4.1. BodyDump now captures only the configured prefix for logging and reconstructs the handler's reader from that prefix plus the unread original stream. It preserves the original closer and read errors instead of silently draining the rest. Fix commit. Streaming BodyLimit enforcement still requires the application to consume the request body and handle read errors. The BodyDump capture cap is a logging cap, not an application body limit. WorkaroundsDisable BodyDump on affected routes, or ensure the BodyLimit overflow is detected during the initial capture by setting the capture limit above the enforced body limit. Upgrading is recommended because it also preserves the complete body for handlers. CreditsReported by @Duodum. The fix incorporates @jakezwang's request-body preservation work in #3105. Fixed in
5.4.1
References Updated Oct 28, 2026 · Source: OSV.dev |
v5.4.0
minor
Dependencies (3)
|
|
v5.3.1
patch
11 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.3.1
patch
Dependencies (3)
|
|
v5.3.0
minor
11 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.3.0
minor
Dependencies (3)
|
|
v5.2.1
patch
11 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.2.1
patch
Dependencies (3)
|
|
v5.2.0
minor
11 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.2.0
minor
Dependencies (3)
|
|
v5.1.1
patch
13 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.1.1
patch
Dependencies (3)
|
|
v5.1.0
minor
14 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.1.0
minor
Dependencies (3)
|
|
v5.0.4
patch
15 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.0.4
patch
Dependencies (3)
|
|
v5.0.3
patch
15 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.0.3
patch
Dependencies (3)
|
|
v5.0.2
patch
16 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.0.2
patch
Dependencies (3)
|
|
v5.0.1
patch
16 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.0.1
patch
Dependencies (3)
|
|
v5.0.0
initial
16 CVEs
CVE-2026-118657
GHSA-2ffq-g2xg-c22p
Oct 28, 2026
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
5.9
/ 10
Medium
Network
High
None
Required
Unchanged
High
Low
None
Description
The trusted headers (checked in this order of precedence):
Threat modelScenario A — Directly exposed application (vulnerable by default):
The Echo application listens on HTTP and is reachable directly by clients (no L7 proxy in front), or an attacker can bypass the proxy and reach the backend directly. In this case, the attacker has full control over all request headers. Sending This is the primary scenario. The application is vulnerable by default with no misconfiguration required — simply using Scenario B — Behind L7 proxy with header sanitization (reduced risk):
If the application is strictly behind a correctly configured L7 proxy that always overwrites Root cause
Two additional issues with this implementation:
Affected components| Component | File | Line(s) | Impact |
|-----------|------|---------|--------|
| This is an unsafe-by-default API surface, not just misconfigurationThis behavior is not accidental — it is codified in the project's own test suite. For example,
Similarly, The problem is not that the framework can use forwarded headers — that is legitimate behind a trusted proxy. The problem is that there is no mechanism to control whether this trust is appropriate, unlike the existing IP header trust model. Inconsistency with existing trust modelEcho already recognizes this class of header-trust vulnerability for IP addresses. The
No equivalent mechanism exists for scheme detection. Note on proxies and the "3 additional headers"A correctly configured nginx The three additional headers become real attack vectors specifically when:
In such cases, an attacker can bypass via any of the four headers. The main vulnerability (HTTPS redirect bypass via ImpactHTTPS downgrade / MITM: An attacker who can reach the Echo HTTP endpoint directly can prevent HTTPS redirection, keeping client traffic on plaintext HTTP and enabling man-in-the-middle attacks. HSTS suppression: Behind a TLS-terminating proxy, spoofing URL construction with arbitrary scheme: Proof of ConceptTested on Echo v5.0.4 (commit PoC 1: HTTPS Redirect Bypass (Go test)
PoC 2: curl examples (easiest to reproduce)Start a minimal Echo server:
Then:
PoC 3: Arbitrary scheme in redirect URL (WWWRedirect)
PoC 4: HSTS Suppression
Test output (all attacks succeed)
Precedent CVEs
Suggested fixOption A:
|
v5.0.0
initial
Dependencies (3)
|