@fastify/reply-fromに パス・トラバーサルの脆弱性、認可外のパスに到達のおそれ
概要
@fastify/reply-fromの12.8.1から12.8.3には、スキーム付きの割り当て済みパス・トラバーサルの脆弱性があります。対象の上流サーバーで想定外のパスが提供され、認証のないクライアントが設定されたプレフィックスの外にあるエンドポイントに到達するおそれがあります。修正版の12.8.4以降に更新してください。
AI要約
SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
@fastify/reply-fromの12.8.1から12.8.3には、スキーム付きの割り当て済みパス・トラバーサルの脆弱性があります。対象の上流サーバーで想定外のパスが提供され、認証のないクライアントが設定されたプレフィックスの外にあるエンドポイントに到達するおそれがあります。修正版の12.8.4以降に更新してください。
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| @fastify/reply-from@fastify/reply-from |
12.8.1 以上 12.8.4 未満→ 12.8.4 |
12.8.4 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
@fastify/reply-from is a Fastify plugin that forwards requests to an upstream HTTP server. In versions 12.8.1 through 12.8.3, its buildURL function checked the attacker-supplied source string for parent-directory segments, but when the source begins with the same special scheme as the base, such as http or https, the WHATWG URL parser drops the scheme and resolves the remainder as a relative path. A payload that glues the scheme to a percent-encoded parent-directory sequence therefore passes the check, because the inspected segment reads as the scheme plus the dots rather than a bare parent-directory token, while the proxy forwards the encoded traversal unchanged. An upstream that percent-decodes the request path before resolving dot-segments then serves a path outside the configured prefix, so an unauthenticated client scoped to an upstream prefix, or relying on Fastify route guards in front of the proxy, can escape that prefix and reach sibling or parent upstream endpoints. The per-segment check added in 12.8.1 is what the scheme prefix bypasses, and releases up to 12.8.0 already rejected the decoded form. The issue is fixed in @fastify/reply-from 12.8.4, and users should upgrade to 12.8.4 or later.
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory github.com
- advisory cna.openjsf.org
- advisory github.com
- advisory nvd.nist.gov
- REDHAT Red Hat