Echo 5.4.6
Echo v5.4.6 shipped on November 15, 2026, and it is a one-line security release with a side of behavior change. That is not a complaint. A single header leak through the reverse proxy is a real finding, and the fix is small enough to audit in a few minutes. But before you upgrade, know exactly what changes for anyone running a custom balancer.
The Bug: Losing X-Forwarded-Proto
The proxy middleware could lose the X-Forwarded-Proto header it set on the upstream request. A client naming that header in its own Connection header turned it into a hop-by-hop header, and Go strips hop-by-hop headers from forwarding. The result: the upstream received requests with no scheme information, and on plain HTTP requests and WebSocket upgrades the header quietly disappeared.
Why that matters: anything behind Echo that decides between secure and insecure behavior based on X-Forwarded-Proto now makes that decision with missing data. Redirect loops, mixed cookie flags, or a trusted proxy chain that suddenly looks untrusted are the realistic failure modes. If the upstream also trusts that header for building absolute URLs, links can come out with the wrong scheme.
The patch sets X-Forwarded-Proto again after Go removes hop-by-hop headers, which is what the middleware already did for X-Real-IP. The advisory is GHSA-h6x5-phvw-c55c, credited to zachary-satterly.
The Behavior Change You Did Not Ask For
Here is the part worth reading twice. If you have a custom balancer that replaces the request and sets its own X-Forwarded-Proto, that value no longer reaches the upstream. The proxy now uses the scheme of the original request instead.
That is a sensible security posture and a bad surprise for anyone who was using a balancer to rewrite the scheme deliberately, for example a service that terminates TLS itself and re-signals it downstream. The workaround is a custom ProxyConfig.Transport, which can still set the header. If you are in that group, pin the upgrade to a branch where you have tested the transport path, not to a Friday afternoon deploy.
Scope of the Release
Echo states no public API changes, no dependency changes, and no minimum Go version change. The v4 branch got the same treatment as v4.16.5 on the same day, so anyone still on 4.x is not left exposed. That parallel release cadence is one of the better habits in this project.
Where 5.4 Sits
The 5.4 line opened on September 27, 2026, and has since moved through six patch releases in about seven weeks. That cadence tells you the maintainers are shipping fixes fast, and it also tells you the line is young. If you moved to Echo 5.x recently, expect to bump patch versions more often than you did on 4.x, and pin exact versions in your go.mod rather than floating minor ranges.
Upgrade Notes
- Bump to
github.com/labstack/echo/v5 v5.4.6, orv4.16.5if you are on the 4.x line. - Audit reverse proxy setups for services that read
X-Forwarded-Protoon the upstream side. Confirm they still see the expected scheme after the patch. - If you use a custom balancer that rewrites the request, move the header logic into
ProxyConfig.Transportbefore upgrading. - Re-test WebSocket upgrades through the proxy. The original bug affected them specifically, so that path deserves a manual check rather than trusting an existing unit test.
Verdict: upgrade, and read your proxy config while you are at it. The bug is a header leak that can be triggered by a client, the fix is minimal, and the only real risk is the balancer behavior change for teams that relied on the old behavior. If that is not you, this is a ten-minute change. If it is you, it is a ten-minute change plus an afternoon of testing, which is still cheaper than shipping a proxy that drops scheme information on WebSocket upgrades.