Skip to content

← Actionable
Medium, CVSS 5.3amended

Echo has Rate Limiter Bypass via Spoofed X-Forwarded-For Header in Default Configuration

CVE-2026-118653GHSA-246p-cpwv-v3jq

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

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

  • Go github.com/labstack/echo/v4

    Affected
    >= 4.0.0, <= 4.16.2
    Fixed in
    no fixed version recorded
  • Go github.com/labstack/echo/v5

    Affected
    < 5.1.0
    Fixed in
    5.1.0

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-118653: 0.41% estimated exploitation activity in the next 30 days; percentile 35.87 (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.

Summary When `echo.New()` is used without explicitly setting `Echo#IPExtractor`, the `RealIP()` method falls back to reading the client-supplied `X-Forwarded-For` (or `X-Real-IP`) header without any proxy-origin validation. The default `RateLimiter()` middleware derives its per-client identifier from `ctx.RealIP()`, so an attacker can rotate arbitrary values in the `X-Forwarded-For` header on each request to obtain a fresh rate-limit bucket and bypass IP-based throttling entirely.

Affected Component - `context.go` — `(*Context).RealIP()` (lines 186–208), legacy fallback branch (lines 190–200) - `middleware/rate_limiter.go` — `DefaultRateLimiterConfig.IdentifierExtractor` (lines 46–58); `RateLimiter()` (lines 71–76) - `echo.go` — `New()` (lines 326–343), `IPExtractor` left `nil` by default

Description

`RealIP()` unconditionally trusts `X-Forwarded-For` when `IPExtractor` is unset `Context.RealIP()` (`context.go:186-208`) first checks `c.echo.IPExtractor`. When this field…

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

    Amended from osv record GHSA-246p-cpwv-v3jq

  2. Revision 1 · created ·

    Published from ghsa record GHSA-246p-cpwv-v3jq

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-118653

Advisory: Echo has Rate Limiter Bypass via Spoofed X-Forwarded-For Header in Default Configuration
IDs: CVE-2026-118653, GHSA-246p-cpwv-v3jq
Record: https://patchnext.com/advisories/cve-2026-118653 (revision 2, 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: Partial vendor fix; fixed versions by package: github.com/labstack/echo/v5 5.1.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/labstack/echo/v4: affected >= 4.0.0, <= 4.16.2
- Go github.com/labstack/echo/v5: affected < 5.1.0; fixed in 5.1.0

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

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/labstack/echo/v4, 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://github.com/advisories/GHSA-246p-cpwv-v3jq (GitHub-reviewed advisory GHSA-246p-cpwv-v3jq lists affected ranges: Go github.com/labstack/echo/v5 >=0 =4.0.0 <=4.16.2)
- Verified: https://osv.dev/vulnerability/GHSA-246p-cpwv-v3jq (OSV record GHSA-246p-cpwv-v3jq lists affected ranges: Go github.com/labstack/echo/v5 >=0 =4.0.0 <=4.16.2)

Commands are suggestions: review each one before running it.

Loading voting…