cve.bz

CVE-2026-135279 @fastify/express vulnerable to middleware bypass via empty route parameters in Express routers and sub-applications

9.1 critical

Critical (9.1) in @fastify/express @fastify/express.

On this page
@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.

Severity

CVSS 3.1

9.1 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CWEs
CWE-287 Improper Authentication
CWE-436 Interpretation Conflict
OWASP Top 10
A06:2025 Insecure Design, A07:2025 Authentication Failures
Published
Assigned by
openjs (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-135279 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-135279?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-135279?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-135279 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
@fastify/expressbefore 4.0.14

Attack patterns (CAPEC)

  • CAPEC-34 HTTP Response Splitting Likelihood: Medium · Severity: High
  • CAPEC-105 HTTP Request Splitting Likelihood: Medium · Severity: High
  • CAPEC-273 HTTP Response Smuggling Likelihood: Medium · Severity: High
  • CAPEC-22 Exploiting Trust in Client Likelihood: High · Severity: High
  • CAPEC-57 Utilizing REST's Trust in the System Resource to Obtain Sensitive Data Likelihood: Medium · Severity: Very High
  • CAPEC-94 Adversary in the Middle (AiTM) Likelihood: High · Severity: Very High
  • CAPEC-114 Authentication Abuse Severity: Medium
  • CAPEC-115 Authentication Bypass Severity: Medium
  • CAPEC-151 Identity Spoofing Likelihood: Medium · Severity: Medium
  • CAPEC-194 Fake the Source of Data Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-287.

References

Check your stackJSON