CVE-2026-118656

Echo: Open Redirect via Control-Character Prefix Defeating sanitizeURI

Published Oct 28, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, sanitizeURI checks only the first two bytes of a redirect target before deciding whether it begins with an absolute-path separator pair. When AddTrailingSlash or RemoveTrailingSlash is configured with a redirect status, a slash, TAB, separator path form can evade the guard, be emitted in the Location header, and be normalized by a browser into an attacker-controlled host. This issue is fixed in 4.16.0 and 5.4.0.

Analysis

AI-generated

Technical impact

Echo is a popular Go web framework that performs URI sanitization to guard against open redirects. Prior to version 4.16.0 and 5.4.0, the sanitizeURI function examines only the first two bytes of a redirect target. A malicious redirect target that begins with a slash followed by a tab or separator character can bypass this check, be emitted as a Location header, and be resolved by the browser into an attacker‑controlled host. This flaw allows an attacker to redirect authenticated users to arbitrary URLs, facilitating phishing or credential‑stealing attacks.

Affected Systems

The vulnerability affects all installations of the Labstack Echo framework with versions earlier than 4.16.0 or 5.4.0 when the AddTrailingSlash or RemoveTrailingSlash features are configured to issue redirects with a status code. Systems that have upgraded to Echo 4.16.0 or 5.4.0 and later are not affected.

Risk and Exploitability

The CVSS score of 6.1 indicates moderate severity; the EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog. Attacks can be carried out by any user capable of triggering a route that uses the affected redirection logic. Successful exploitation results in the victim’s browser navigating to an attacker‑chosen host, potentially enabling phishing or credential harvesting. No privileged execution is required. The most likely attack vector is a crafted HTTP request to a route that performs a redirect using the vulnerable helper functions.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Echo to version 4.16.0 or 5.4.0 or later;
  • If upgrading is not immediately possible, disable the AddTrailingSlash and RemoveTrailingSlash redirect features or configure them to avoid issuing redirects with a status code.
  • Implement additional validation of redirect targets to reject any URI containing control characters or non‑printing characters before emitting the Location header.

Generated by OpenCVE AI on October 28, 2026 at 22:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-v753-g4cw-jm48 Echo has Open Redirect via Control-Character Prefix Defeating sanitizeURI
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Labstack
Labstack echo
Vendors & Products Labstack
Labstack echo
Type Values Removed Values Added
Description Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, sanitizeURI checks only the first two bytes of a redirect target before deciding whether it begins with an absolute-path separator pair. When AddTrailingSlash or RemoveTrailingSlash is configured with a redirect status, a slash, TAB, separator path form can evade the guard, be emitted in the Location header, and be normalized by a browser into an attacker-controlled host. This issue is fixed in 4.16.0 and 5.4.0.
Title Echo: Open Redirect via Control-Character Prefix Defeating sanitizeURI
Weaknesses CWE-601
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 29, 2026, 5:23 PM
Reserved
Oct 28, 2026, 5:25 PM
Status
Awaiting Analysis
Published
Oct 28, 2026, 9:16 PM
Modified
Oct 29, 2026, 6:17 PM
Severity
Moderate
Public date
Oct 28, 2026, 8:12 PM