Skip to content

← Actionable
Medium, CVSS 5.3amended

Echo: X-Real-IP extractor trusts the header value instead of the sending peer

CVE-2026-118265GHSA-h53f-rm2w-w7rg

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/labstack/echo/v5 5.4.1), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS
  • CVE-2026-118265: 0.14% estimated exploitation activity in the next 30 days; percentile 3.26 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Impact In Echo v5, `ExtractIPFromRealIPHeader` checked whether the address supplied in `X-Real-IP` belonged to a trusted range instead of checking the address of the direct network peer. An untrusted client could therefore supply a loopback or private address and have it returned by `c.RealIP()` with the extractor's default trust options. Applications using this extractor for IP allowlists, IP-based rate limiting, audit logs or forwarding headers could accept a spoofed client identity. Exploitation requires that the attacker can reach Echo directly or that an intervening proxy passes through the attacker's `X-Real-IP` value. Applications using the default direct IP extractor are unaffected. Echo v4 is unaffected by this v5 regression.

Affected versions and patch All v5 releases from v5.0.0 through v5.4.0 are affected. Upgrade to v5.4.1. The patch validates the direct peer before accepting a syntactically valid `X-Real-IP`…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 5 · amended ·

    Amended from osv record GHSA-h53f-rm2w-w7rg

  2. Revision 4 · amended ·

    Amended from ghsa record GHSA-h53f-rm2w-w7rg

  3. Revision 3 · amended ·

    Amended from ghsa record GHSA-h53f-rm2w-w7rg

  4. Revision 2 · amended ·

    Amended from ghsa record GHSA-h53f-rm2w-w7rg

  5. Revision 1 · created ·

    Published from osv record GHSA-h53f-rm2w-w7rg

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-118265

Advisory: Echo: X-Real-IP extractor trusts the header value instead of the sending peer
IDs: CVE-2026-118265, GHSA-h53f-rm2w-w7rg
Record: https://patchnext.com/advisories/ghsa-h53f-rm2w-w7rg (revision 5, source checked 29 Oct 2026, 06:45 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: github.com/labstack/echo/v5 5.4.1. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/labstack/echo/v5: affected >= 5.0.0, < 5.4.1; fixed in 5.4.1

## Suggested inspection (read-only)
- Go github.com/labstack/echo/v5: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/labstack/echo/v5.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-h53f-rm2w-w7rg (OSV record GHSA-h53f-rm2w-w7rg lists affected ranges: Go github.com/labstack/echo/v5 >=5.0.0 <5.4.1 (fixed))
- Verified: https://github.com/advisories/GHSA-h53f-rm2w-w7rg (GitHub-reviewed advisory GHSA-h53f-rm2w-w7rg lists affected ranges: Go github.com/labstack/echo/v5 >=5.0.0 <5.4.1)

Commands are suggestions: review each one before running it.

Loading voting…