Authentication Bypass Using an Alternate Path or Channel Affecting github.com/go-chi/chi/v5/middleware package, versions <5.5.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.24% (16th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMGOCHICHIV5MIDDLEWARE-21816629
  • published29 Oct 2026
  • disclosed28 Oct 2026
  • creditdpfkdlemtp

Introduced: 28 Oct 2026

NewCVE-2026-118681  (opens in a new tab)
CWE-288  (opens in a new tab)

How to fix?

Upgrade github.com/go-chi/chi/v5/middleware to version 5.5.0 or higher.

Overview

Affected versions of this package are vulnerable to Authentication Bypass Using an Alternate Path or Channel via the SupressNotFound middleware in middleware/supress_notfound.go. An unauthenticated attacker can send a request to a mounted path whose suffix also matches a public root route; the preflight match mutates the live route context, so the root handler runs with the retained tenant parameter and skips the mounted router’s authentication middleware, exposing tenant-scoped data if that handler trusts the parameter and does not enforce authorization itself. Without a colliding root route, the same context mutation can instead cause a valid request to a mounted child route to return 404.

Workarounds

  • Remove middleware.SupressNotFound from the outer router to prevent its preflight match from misrouting mounted requests.
  • Enforce authorization in a common ancestor or in the handler itself, so a request routed to an outer public handler cannot access tenant-scoped data without authorization.

CVSS Base Scores

version 4.0
version 3.1