Skip to content

← Public intelligence

npm package

@fastify/express

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Critical, CVSS 9.1npmAmendedPublished

    @fastify/express has a middleware authentication bypass via URL normalization gaps (duplicate slashes and semicolons)

    CVE-2026-33808 · GHSA-6hw5-45gm-fj88

    Affected
    • npm @fastify/express <= 4.0.4
    Fixed in
    4.0.5· Vendor fix available
    Issue
    @fastify/express v4.0.4 fails to normalize URLs before passing them to Express middleware when Fastify router normalization options are enabled. This allows complete bypass of path-scoped authentication middleware via two vectors: 1. Duplicate slashes (//admin/dashboard) when ignoreDuplicateSlashes: true is configured 2. Semicolon delimiters (/admin;bypass) when useSemicolonDelimiter: true is configured In both cases, Fastify's router normalizes the URL and matches the route, but @fastify/express passes the original un-normalized URL to Express middleware, which fails to match and is skipped. Note: This is distinct from GHSA-g6q3-96cp-5r5m (CVE-2026-22037), which addressed URL percent-encoding bypass and was patched in v4.0.3. These normalization gaps remain in v4.0.4. A similar class of normalization issue was addressed in @fastify/middie via GHSA-8p85-9qpw-fwgw (CVE-2026-2880), but @fastify/express does not include the equivalent fixes. Details The vulnerability exists in…

    Recommended action: Upgrade to 4.0.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  2. Critical, CVSS 9.1npmAmendedPublished

    @fastify/express's middleware path doubling causes authentication bypass in child plugin scopes

    CVE-2026-33807 · GHSA-hrwm-hgmj-7p9c

    Affected
    • npm @fastify/express <= 4.0.4
    Fixed in
    4.0.5· Vendor fix available
    Issue
    @fastify/express v4.0.4 contains a path handling bug in the onRegister function that causes middleware paths to be doubled when inherited by child plugins. This results in complete bypass of Express middleware security controls for all routes defined within child plugin scopes that share a prefix with parent-scoped middleware. No special configuration is required — this affects the default Fastify configuration. Details The vulnerability exists in the onRegister function at index.js lines 92-101. When a child plugin is registered with a prefix, the onRegister hook copies middleware from the parent scope and re-registers it using instance.use(...middleware). However, the middleware paths stored in kMiddlewares are already prefixed from their original registration. The call flow demonstrates the problem: 1. Parent scope registers middleware: app.use('/admin', authFn) — use() calculates path as '' + '/admin' = '/admin' — stores ['/admin', authFn] in kMiddlewares 2. Child plugin…

    Recommended action: Upgrade to 4.0.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  3. High, CVSS 8.4npmAmendedPublished

    @fastify/express vulnerable to Improper Handling of URL Encoding (Hex Encoding)

    CVE-2026-22037 · GHSA-g6q3-96cp-5r5m

    Affected
    • npm @fastify/express <= 4.0.2
    Fixed in
    4.0.3· Vendor fix available
    Issue
    A security vulnerability exists in @fastify/express where middleware registered with a specific path prefix can be bypassed using URL-encoded characters (e.g., /%61dmin instead of /admin). While the middleware engine fails to match the encoded path and skips execution, the underlying Fastify router correctly decodes the path and matches the route handler, allowing attackers to access protected endpoints without the middleware constraints. Details The vulnerability is caused by how @fastify/express matches requests against registered middleware paths. PoC Step 1: Run the following Fastify application (save as app.js): Step 2: Execute the attack. It differs from CVE-2026-22031 because this is a different npm module with its own code.

    Recommended action: Upgrade to 4.0.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →