Skip to main content

LabStack Echo CVE-2026-118657

| EUVDEUVD-2026-112464 MEDIUM
Origin Validation Error (CWE-346)
2026-10-28 GitHub_M GHSA-2ffq-g2xg-c22p
5.9
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach Echo HTTP endpoint directly or via proxy that forwards client headers
  2. Delivery
    Send spoofed X-Forwarded-Proto: https (or X-Forwarded-Ssl/X-Url-Scheme)
  3. Exploit
    Context.Scheme() treats request as secure, HTTPSRedirect/HSTS bypassed
  4. Execution
    Victim traffic stays plaintext
  5. Impact
    Intercept or tamper via man-in-the-middle

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Origin validation
Exploitation Conditions

The application must use Echo's HTTPSRedirect (or HTTPSWWWRedirect/HTTPSNonWWWRedirect/WWWRedirect/NonWWWRedirect) or the Secure/HSTS middleware, all of which consume Context.Scheme(). Scenario A (vulnerable by default): Echo listens on plaintext HTTP and is directly reachable with no L7 proxy, or the attacker can bypass the proxy and reach the backend directly, giving full control of the X-Forwarded-Proto / X-Forwarded-Protocol / X-Forwarded-Ssl / X-Url-Scheme headers - sending 'X-Forwarded-Proto: https' over HTTP defeats HTTPSRedirect. Scenario B (HSTS suppression): the app sits behind a TLS-terminating proxy that passes an attacker-controlled X-Forwarded-Proto through (e.g. nginx without 'proxy_set_header X-Forwarded-Proto $scheme;'); spoofing 'X-Forwarded-Proto: http' suppresses the Strict-Transport-Security header even though the client receives the response over HTTPS. LIMITING FACTORS: risk is materially reduced when a trusted proxy unconditionally overwrites these headers and direct backend access is prevented; converting the downgrade into data theft generally requires a man-in-the-middle position and victim traffic over the downgraded channel; before the fix there was no trusted-source configuration, so the pre-4.16.0/5.4.0 default is unsafe.

Impact

This is a genuine but moderate-priority issue, not a drop-everything emergency. The CVSS base score of 5.9 (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N) reflects an unauthenticated, network-reachable flaw whose real-world impact is gated by two meaningful dampeners: high attack complexity (the attacker typically also needs a man-in-the-middle position to monetize the HTTPS downgrade) and required user interaction (a victim must actually transmit traffic over the downgraded plaintext channel). The vuln.today decision label is 'this_month' (not act_now or emergency), which aligns with patching on a normal cycle rather than an out-of-band push. No EPSS probability and no KEV status were supplied in the input, so widespread or automated exploitation cannot be confirmed or ruled out from the data - EPSS is simply missing, not low. A detailed, vendor-published proof-of-concept (curl one-liners and Go tests, stated as tested on Echo v5.0.4) exists inside the GHSA advisory, so exploitation is trivially reproducible even though no active exploitation is reported. The most important risk nuance is that the product is vulnerable by default in Scenario A (Echo listening on HTTP and directly reachable): simply using middleware.HTTPSRedirect() as documented is enough to be exposed, with no misconfiguration required. Risk drops substantially in Scenario B when a correctly configured L7 proxy overwrites X-Forwarded-Proto and direct backend access is blocked, but that relies on perimeter controls external to the framework. Net: prioritize for operators who terminate TLS at a proxy or expose Echo directly, but the complexity and UI requirements keep it below critical.

Exploit ScenarioDerived

An Echo application listens on plaintext HTTP, reachable directly by clients, and relies on middleware.HTTPSRedirect() to force HTTPS. A remote unauthenticated attacker (or a victim's own traffic shaped by a network-positioned attacker) sends 'X-Forwarded-Proto: https' over HTTP, so Context.Scheme() reports the request as already secure and the redirect is suppressed, keeping the session on plaintext and enabling man-in-the-middle interception. A working proof-of-concept (curl commands and Go tests, tested on v5.0.4) is published in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 28, 2026

Spoofed forwarded-scheme headers let remote clients defeat Echo's HTTPS enforcement: Context.Scheme() in LabStack Echo before 4.16.0 and 5.4.0 reads X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl and X-Url-Scheme from any request without validating the source, so an unauthenticated attacker (CVSS PR:N) who reaches an HTTP listener directly can send 'X-Forwarded-Proto: https' and skip HTTPSRedirect entirely, or, behind a TLS-terminating proxy that passes client headers through, send 'X-Forwarded-Proto: http' to suppress the Strict-Transport-Security header while the browser still receives the response over HTTPS. The attack requires victim interaction (UI:R) and a man-in-the-middle position or a header-passing proxy to convert the downgrade into real data exposure, which is why it rates 5.9 rather than critical, and risk drops sharply where a trusted proxy overwrites these headers and direct backend access is blocked. Fixes ship in v4.16.0 and v5.4.0; proof-of-concept curl and Go test snippets are published in the advisory, though no CISA KEV entry exists and the issue is triaged as this-month rather than emergency.

RemediationAI

Vendor-released patch: upgrade to Echo v4.16.0 or v5.4.0 (fix commits b838391e2eade87ae7e5a09d7bb5087bec271ec1 and fc410094b2f3415cf2bf5204082137b205bfd5af; advisory GHSA-2ffq-g2xg-c22p). The fix makes forwarded scheme headers trusted only when the request arrives from a loopback, link-local or private address or a unix socket, selectable through the new Echo#SchemeExtractor field: ExtractSchemeFromHeaders(...TrustOption) is the default, ExtractSchemeDirect() ignores headers entirely, and LegacySchemeExtractor() restores the old unconditional trust (trading the vulnerability back for compatibility, and safe only if every request passes through a proxy that sets these headers). Operators whose proxy connects from a public or 100.64.0.0/10 address - Cloudflare, CloudFront, Azure Front Door to a public origin, the GCP external HTTP(S) load balancer including GKE Ingress, Alibaba Cloud SLB, EKS custom networking - must add the proxy ranges to the extractor or upgrading will cause HTTPSRedirect loops and stopped HSTS emission, e.g. echo.TrustIPRange for 35.191.0.0/16 and 130.211.0.0/22; widen ranges only to the actual proxy, since every trusted range is a source that can set the scheme. Ensure the proxy overwrites X-Forwarded-Proto rather than passing the client value through, and restrict direct backend access; the framework's Proxy middleware now always sets X-Forwarded-Proto from Context.Scheme() and strips X-Forwarded-Ssl, X-Forwarded-Protocol and X-Url-Scheme upstream. Expect behavior changes: invalid X-Forwarded-Proto now yields 'http' instead of falling through to the other headers, and tests using httptest.NewRequest (RemoteAddr 192.0.2.1) must set req.RemoteAddr to a trusted address or opt into LegacySchemeExtractor. No vendor patch exists for the 4.x IP-extraction defaults noted in the same release, so set Echo#IPExtractor (ExtractIPDirect or ExtractIPFromXFFHeader with trust options) separately if rate limiting or proxy logging depends on RealIP().

Affected VersionsENISA

Echo < 4.16.0
Echo 5.0.0, < 5.4.0

Affected Packages

go github.com/labstack/echo/v4 fix: 4.16.0
go github.com/labstack/echo/v5 fix: 5.4.0
euvd echo fix: 4.16.0, 5.4.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Echo is a Go HTTP web framework and this is a CWE-346 origin validation error: the framework makes a security decision (is this request secure?) from a client-supplied header without verifying that the header came from a trusted intermediary. Context.Scheme() (context.go lines 161-181) returns 'https' immediately if the connection is TLS, otherwise returns the raw value of the first present header in precedence order X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl (only when equal to 'on'), X-Url-Scheme, and falls back to 'http'. There is no allowlist, no value validation (arbitrary strings are returned, breaking the documented http/https contract and letting WWWRedirect/NonWWWRedirect build URLs with attacker-chosen schemes such as javascript: or data:), and no trusted-source configuration at all. The return value is consumed directly by security middleware: HTTPSRedirect, HTTPSWWWRedirect and HTTPSNonWWWRedirect in middleware/redirect.go treat 'https' as already-secure and return without redirecting, while Secure middleware (middleware/secure.go:125) gates the HSTS header on the same value. The project's own test suite codified the unsafe behavior by asserting that X-Forwarded-Proto: https on a plaintext request yields 200 instead of a 301. Echo already had a trusted-source model for client IPs (IPExtractor plus TrustOption options TrustLoopback, TrustPrivateNet, TrustLinkLocal, TrustIPRange) with documentation explicitly warning that headers must not be trusted unconditionally; the fix generalizes that pattern by adding an Echo#SchemeExtractor field with ExtractSchemeFromHeaders(...TrustOption) as the default, plus ExtractSchemeDirect() and LegacySchemeExtractor().

Know when Echo gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
vuln.today AI 5.9 MEDIUM

Unauthenticated header spoofing (PR:N) is trivial, but realizing MITM impact needs a network position and victim traffic, so AC:H and UI:R; plaintext exposure gives C:H, scheme injection I:L.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:P/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Oct 28, 2026 - 21:19 EUVD

DescriptionCVE.org

Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Context.Scheme unconditionally trusts forwarded scheme headers from any client. A client that reaches Echo directly over plaintext HTTP can claim an HTTPS scheme and bypass HTTPSRedirect because the request is treated as already secure. Separately, behind a TLS-terminating proxy that passes an attacker-controlled header, a claimed HTTP scheme can suppress the Strict-Transport-Security header even though the browser receives the response over HTTPS. The practical risk is reduced when a trusted proxy overwrites the headers and direct backend access is prevented, but the framework previously had no trusted-source configuration for this decision. This issue is fixed in 4.16.0 and 5.4.0.

Threat Intelligence Overview

Prevalence
Medium
popular Go web framework, limited to Go HTTP services using these middlewares
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Echo

View all
CVE-2022-40083 CRITICAL POC
9.6 Sep 28

Labstack Echo v4.8.0 was discovered to contain an open redirect vulnerability via the Static Handler component. Rated cr

CVE-2023-38817 HIGH POC
7.8 Oct 11

An issue in Inspect Element Ltd Echo.ac v.5.2.1.0 allows a local attacker to gain privileges via a crafted command to th

CVE-2026-25766 MEDIUM POC
5.3 Feb 19

Unauthenticated remote file read in Echo web framework versions 5.0.0-5.0.2 on Windows allows attackers to traverse outs

CVE-2026-55677 HIGH
7.5 Jun 26

Path-based access control bypass in the LabStack Echo Go web framework (versions prior to 4.15.3 and 5.2.0) lets remote

CVE-2025-51741 HIGH
7.5 Nov 25

An issue was discovered in Veal98 Echo Open-Source Community System 2.2 thru 2.3 allowing an unauthenticated attacker to

CVE-2026-118656 MEDIUM
6.1 Oct 28

An open redirect in the Go web framework Echo lets an attacker craft a link on a trusted domain that sends victims to an

CVE-2026-118266 MEDIUM
5.3 Oct 28

CSRF protection in Labstack Echo can be skipped entirely when the MethodOverride middleware rewrites a POST to a safe me

CVE-2026-118658 MEDIUM
4.7 Oct 28

Echo's WWWRedirect() and NonWWWRedirect() middlewares build the Location header from Context.Scheme(), which returns the

CVE-2015-8007 MEDIUM
4.0 Nov 09

The Echo extension for MediWiki does not properly implement the hideuser functionality, which allows remote authenticate

CVE-2026-5266 LOW
2.3 May 11

Sensitive notification data is exposed to authenticated but unauthorized actors through the Echo extension's API layer i

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy