脆弱性ウォッチ

新着 / 2026年11月27日 / CVE-2026-135280

@fastify/express 大文字小文字非区別ルーティング時のミドルウェア迂回の脆弱性

重要 7.4

掲載

何が問題か

@fastify/express は、Express のミドルウェアや Express アプリケーションを Fastify 上で動かすプラグインです。4.0.14 より前のバージョンでは、大文字小文字を区別しないルーティングを有効にしている場合に、パス単位のミドルウェアが実行されないケースがあります。Unicode文字を含むマウントパスや、Express のルーター内で大文字小文字を区別するマッチャーを使っている場合に該当すると説明されています。

悪用されると

ミドルウェアで実装された認証などのアクセス制御を迂回され、Fastify のルートハンドラーに到達される可能性があります。影響を受けるのは大文字小文字非区別ルーティングを有効にしているアプリケーションに限られます。CVSS v3.1 の基本スコアは 7.4(HIGH)です。悪用の有無は公表されていません。

取るべき対応

修正版の 4.0.14 以降へアップグレードしてください。すぐに更新できない場合は、ルーティング後に実行される preHandler などの Fastify フックで認証を強制し、マウントパスでの特定Unicode文字の使用を避け、Express 側では大文字小文字を区別しないマッチングを行うことが回避策として示されています。

AIが出典から要約し、数値を機械照合しています。

更新履歴

  1. 初回掲載。

指標

深刻度(CVSS v3.1)重要 7.4
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
実際の攻撃での悪用CISA KEVには未掲載
問題の種類CWE-178、CWE-863
CVE公開日2026-11-26

出典

公式の説明(英語の原文)

@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, when an application enables case-insensitive routing, middleware mounted on a path can still be skipped in two cases: a string mount path or plugin prefix containing a Unicode character whose case folding differs from a plain lowercase conversion fails to match the lowercased request path, and a matcher that stays case-sensitive inside an Express Router or application, such as a regular expression without the ignore-case flag or an explicitly case-sensitive router, only matches its own casing. In both cases a request reaches the Fastify route handler while the path-scoped middleware does not run. An attacker can use this to bypass authentication or other middleware-based access controls on the affected routes, and only applications that enable case-insensitive routing are affected. 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, avoid such Unicode characters in mount paths, and match case-insensitively inside Express routers and applications.