Skip to main content
Menu
CVEs

Fastify Express auth bypass in middleware on empty route parameters

Affects @fastify/express before 4.0.14 when middleware is mounted inside an Express Router or sub-application passed to fastify.use(). CVSS scores it 9.1 Critical. Fixed in 4.0.14.

CVE-2026-135279Published November 26, 2026, updated

9.1CriticalCNA
Exploited
No known exploitation
Fix
Fixed in 4.0.14
Who is exposed
Default setups

Summary

The @fastify/express plugin, which runs Express middleware and applications inside Fastify, can be reached remotely without logging in. A request with an empty dynamic route parameter causes middleware mounted for that path inside an Express Router or sub-application to be skipped, letting an attacker bypass authentication or other middleware-based access controls on the affected routes, with the impact depending on what the empty value selects.

Written by a model

Original description

@fastify/express is the plugin that lets an application run Express middleware and Express applications inside the Fastify web framework. In versions before 4.0.14, a request with an empty dynamic route parameter reaches a Fastify route handler while middleware mounted for that path inside an Express Router or sub-application is skipped, because Fastify's router accepts an empty value where Express requires a non-empty one, and an unanchored regular-expression mount passed to the plugin is bypassed the same way. An earlier fix covered only the mount paths passed to the plugin directly, not middleware mounted inside a routed Express application. An attacker can use this to bypass authentication or other middleware-based access controls on the affected routes, with the practical impact depending on what the empty value selects in the application. The issue is fixed in @fastify/express 4.0.14, and users should upgrade to 4.0.14 or later. As a workaround, enforce authentication in a Fastify hook such as preHandler that runs after routing, mount the middleware on a static parent path, or require non-empty values in the route params schema.

Who should check

Teams running @fastify/express below 4.0.14 that mount Express routers or sub-applications via fastify.use() on dynamic route paths.

Not fixed by: The earlier 4.0.10 check covers only mount paths passed to fastify.use(), not routed Express apps.

“Middleware mounted inside an Express Router or application that is itself passed to fastify.use()”

github.com

What to do

  1. Check every install: default setups are affected.

  2. Upgrade to a fixed version: 4.0.14.

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-135279 (@fastify/express vulnerable to middleware bypass via empty route parameters in Express routers and sub-applications), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-135279 (entry last updated 2026-11-26):
Affected:
- npm package @fastify/express: fixed in 4.0.14
Fixed versions: 4.0.14.
Conditions (all must be true for the bug to be hit):
- Middleware is mounted inside an Express Router or sub-application that is itself passed to fastify.use() (source: https://github.com/fastify/fastify-express/security/advisories/GHSA-f9qf-hfc5-7xpj)
- The affected route has a dynamic parameter or wildcard that a request can leave empty (source: https://github.com/fastify/fastify-express/security/advisories/GHSA-f9qf-hfc5-7xpj)
- The default router configuration is sufficient to trigger the bug (source: https://github.com/fastify/fastify-express/security/advisories/GHSA-f9qf-hfc5-7xpj)
Setup: the bug is reachable in a default setup; no special feature or setting is needed.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-135279 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-135279 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Packages (npm): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/fastify/fastify-express/security/advisories/GHSA-f9qf-hfc5-7xpj
- https://cna.openjsf.org/security-advisories.html
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-135279
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-135279"}.

Affected versions

cve.now Index

43Pof 100 · provisional · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure22/25Default setups, reachable over the network without a login
  • Reach12/20@fastify/express: 101.6K downloads a week
  • Severity9.1/10CVSS 9.1
  • No patch0/5No signal

What would change the score

  • Would score about 83 if added to CISA KEV
  • Would score about 78 if CISA's SSVC rates exploitation active

Impact

Timeline

  1. CVE published
  2. First seen by cve.now
  3. Posted on X by cve.now

Evidence 4

KindSource
Vendor advisory 1Establishes: Affected and fixed versions.
AdvisoryGitHub · fastify/fastify-express · Advisory GHSA-f9qf-hfc5-7xpj
CVE record 2Establishes: The identifier and description.
RecordCVE List · CVE-2026-135279
RecordNVD · CVE-2026-135279
Other links 1
Linkcna.openjsf.org · security-advisories.html

Questions about CVE-2026-135279

Is CVE-2026-135279 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

What does this mean?

Middleware mounted inside an Express Router or sub-application passed to fastify.use() is skipped when a dynamic route parameter or wildcard is left empty, so the request still reaches the Fastify route handler. The advisory says this bypasses middleware-based access controls such as authentication on affected routes, and the practical impact depends on what the empty value selects in the application.

Source: github.com

Which versions are affected by CVE-2026-135279?

@fastify/express (npm): before 4.0.14.

Source: cve.now feed data

Am I affected, and how do I check?

Versions of @fastify/express before 4.0.14 are affected when the middleware sits inside an Express Router or sub-application that is passed to fastify.use() and the route has a dynamic parameter or wildcard that a request can leave empty; the advisory says the default router configuration is sufficient. To check a project, look at the installed @fastify/express version (for example with npm ls @fastify/express) and at whether its routes use fastify.use() with such routers.

Source: github.com

How do I fix CVE-2026-135279?

Upgrade @fastify/express to 4.0.14 or later, which is the listed fixed version. The facts do not give a workaround for versions before 4.0.14.

Source: github.com

No corrections so far. Something wrong on this page? Report an error.