@fastify/middie@9.3.7

Middleware engine for Fastify

  • latest version

    9.3.9

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    3 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @fastify/middie package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • C
    Authentication Bypass Using an Alternate Path or Channel

    @fastify/middie is a Middleware engine for Fastify

    Affected versions of this package are vulnerable to Authentication Bypass Using an Alternate Path or Channel via path-scoped middleware matching in lib/engine.js, where middie resolves the request path independently from Fastify's router (find-my-way), allowing the two to disagree on which path a request targets. When they disagree, the router dispatches a request to a handler covered by a middleware mount while middie skips that middleware entirely, so an unauthenticated client reaches a handler that an authentication, authorization, or rate-limiting middleware was meant to protect. Three request forms trigger the mismatch: empty parameter or wildcard values (e.g. /tenant//admin matching a /tenant/:id/admin mount), request targets that do not begin with a slash (e.g. *admin being routed to /admin), and literal percent characters in a mount path (e.g. /100%25 reaching a /100% mount that middie skips due to an extra decode step).

    How to fix Authentication Bypass Using an Alternate Path or Channel?

    Upgrade @fastify/middie to version 9.3.8 or higher.

    <9.3.8