CVE-2026-118656: Echo has Open Redirect via Control-Character Prefix Defeating sanitizeURI
Echo’s dedicated open-redirect guard, sanitizeURI, decides whether a redirect target is a local path by inspecting exactly two byte positions: uri[0] and uri[1]. If the value begins with a control character such as a tab or a newline, followed by a separator pair, the guard does not fire and the value is written to the Location header unchanged.
Browsers remove tab and newline characters from URLs before parsing them, and treat a backslash as a forward slash for HTTP and HTTPS URLs. A Location value of /\t/attacker.example is therefore resolved by the browser as an absolute URL on attacker.example. Confirmed end to end in a headless browser.
References
- github.com/advisories/GHSA-v753-g4cw-jm48
- github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1
- github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af
- github.com/labstack/echo/releases/tag/v4.16.0
- github.com/labstack/echo/releases/tag/v5.4.0
- github.com/labstack/echo/security/advisories/GHSA-v753-g4cw-jm48
- nvd.nist.gov/vuln/detail/CVE-2026-118656
Code Behaviors & Features
Detect and mitigate CVE-2026-118656 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →