Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
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.
- Products
- echo
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-118657
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 13:23 UTC · Revision 1
Source evidence
Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers
core-cve · Original sourcePublished 28 Oct 2026, 20:14 UTC
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.
cve:CVE-2026-118657
echo
Fixed versions: Not specified
Complete source record
{
"id": "a3e54bfa0485aeaf305a95cb1abbb472d3236c4070cbbb406706ffc27f4be7ec",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-118657",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers",
"summary": "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.",
"evidence": "cve:CVE-2026-118657",
"products": [
{
"name": {
"value": "echo",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2026-118657",
"aliases": [
"CVE-2026-118657"
],
"metrics": [
{
"cvssV3_1": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 5.9,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N",
"integrityImpact": "LOW",
"userInteraction": "REQUIRED",
"attackComplexity": "HIGH",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
}
}
],
"affected": [
{
"vendor": "labstack",
"product": "echo",
"versions": [
{
"status": "affected",
"version": ">= 5.0.0, < 5.4.0"
},
{
"status": "affected",
"version": "< 4.16.0"
}
]
}
],
"modified": "2026-10-28T20:14:09.883Z",
"provider": "cve",
"references": [
"https://github.com/labstack/echo/security/advisories/GHSA-2ffq-g2xg-c22p",
"https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1",
"https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af",
"https://github.com/labstack/echo/releases/tag/v4.16.0",
"https://github.com/labstack/echo/releases/tag/v5.4.0"
],
"provider_metadata": {
"cna": {
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M",
"dateUpdated": "2026-10-28T20:14:09.883Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-118657",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 484714,
"published_at": "2026-10-28T20:14:09.883+00:00"
}