@fastify/middieに認証を回避される脆弱性、9.3.10で修正
Summary
@fastify/middieの9.3.6から9.3.9には、プレフィックス付きプラグイン内で先頭にスラッシュのないパスを使うと、ミドルウェアが実行されずにルートへ到達してしまう脆弱性があります。認証などミドルウェアによるアクセス制御を回避される可能性があり、CVSSは7.4です。修正版の9.3.10以降へ更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
@fastify/middieの9.3.6から9.3.9には、プレフィックス付きプラグイン内で先頭にスラッシュのないパスを使うと、ミドルウェアが実行されずにルートへ到達してしまう脆弱性があります。認証などミドルウェアによるアクセス制御を回避される可能性があり、CVSSは7.4です。修正版の9.3.10以降へ更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| @fastify/middie@fastify/middie |
≥ 9.3.6, < 9.3.10→ 9.3.10 |
9.3.10 |
Original description The description as published by the source.
@fastify/middie is the plugin that adds Express-style middleware support to the Fastify web framework. In versions 9.3.6 through 9.3.9, a route or mount path written without a leading slash inside a plugin registered under a prefix is handled inconsistently: the middleware is mounted with a separating slash after the prefix, while the route is concatenated directly onto the prefix, so a request to the concatenated path reaches the route handler without running the middleware mounted for it. An attacker can use this to bypass authentication or other middleware-based access controls on the affected routes. The issue is fixed in @fastify/middie 9.3.10, and users should upgrade to 9.3.10 or later. As a workaround, begin all route and mount paths with a slash, or enforce authentication in a Fastify hook such as preHandler that runs after the router resolves the request.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory cna.openjsf.org
- advisory github.com
- advisory nvd.nist.gov