Vulnerability · Published Oct 28, 2026 · Assigned by GitHub_M
CVE-2026-118265Echo: X-Real-IP extractor trusts the header value instead of the sending peer
Medium 5.3
In plain English
A medium-severity security flaw in echo from labstack. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 3% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Echo is a Go web framework. From 5.0.0 until 5.4.1, Echo v5's ExtractIPFromRealIPHeader validates whether the client-supplied X-Real-IP value belongs to a trusted range instead of validating the direct network peer. A client reaching Echo directly, or through a proxy that preserves the header, can supply a loopback or private address and have Context.RealIP return that spoofed identity. Applications using the extractor for IP allowlists, rate limiting, audit logs, or forwarding headers can consequently trust an attacker-controlled address; the default direct extractor and Echo v4 are unaffected. This issue is fixed in 5.4.1.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/labstack/echo/v5 | 5.4.1 | GO-2026-6841 |
| Go | github.com/labstack/echo/v5 | 5.4.1 | GHSA-h53f-rm2w-w7rg |
| Ubuntu:22.04:LTS | golang-github-labstack-echo | no fix listed | UBUNTU-CVE-2026-118265 |
| Ubuntu:24.04:LTS | golang-github-labstack-echo | no fix listed | UBUNTU-CVE-2026-118265 |
| Ubuntu:26.04:LTS | golang-github-labstack-echo | no fix listed | UBUNTU-CVE-2026-118265 |
| Ubuntu:26.10 | golang-github-labstack-echo | no fix listed | UBUNTU-CVE-2026-118265 |
| Ubuntu:22.04:LTS | golang-github-labstack-echo.v2 | no fix listed | UBUNTU-CVE-2026-118265 |
| Ubuntu:22.04:LTS | golang-github-labstack-echo.v3 | no fix listed | UBUNTU-CVE-2026-118265 |
Affected products (as reported)
Weakness: CWE-348 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
References
- https://github.com/labstack/echo/security/advisories/GHSA-h53f-rm2w-w7rg x_refsource_CONFIRM
- https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaae x_refsource_MISC
- https://github.com/labstack/echo/releases/tag/v5.4.1 x_refsource_MISC