Menu

Empty Route Parameters Broke the Middleware Assumption in @fastify/express
📰

Empty Route Parameters Broke the Middleware Assumption in @fastify/express

DEV Community: fastify·StarkMan·7 days ago
#HY4adVfW
#devtofastify#devto#dev#route#express
Long article (505 words) — no AI summary yet.
Reading 0:00
15s threshold

Empty Route Parameters Broke the Middleware Assumption in @fastify/express

Two routers can agree on a path pattern and disagree on whether a parameter may be empty. CVE-2026-135279 affected @fastify/express before 4.0.14 because Fastify accepted an empty dynamic route value while Express middleware mounted for that path treated the parameter as requiring content.

The bypass

The CVE record says an empty dynamic route parameter could reach a Fastify route handler while middleware inside an Express Router or sub-application was skipped. An unanchored regular-expression mount passed to the plugin could be bypassed in the same way. An earlier fix covered mounts passed directly to the plugin but not middleware inside a routed Express application.

The result is an interpretation conflict. Authentication and access-control middleware can run in Express while a route is eventually dispatched through Fastify.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.