@hapi/contentに正規表現処理の遅延による サービス拒否の脆弱性、6.0.3で修正
Summary
@hapi/contentのバージョン3.0.6から6.0.3より前には、Content-Dispositionヘッダーの解析で処理時間が急増する問題があり、サービス拒否(DoS)の原因になります。multipart/form-dataを受け付けるhapiのルートでは、認証なしでNode.jsのイベントループを止められるおそれがあり、CVSSは7.5(高)です。修正版の@hapi/content 6.0.3へ更新してください。
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.
@hapi/contentのバージョン3.0.6から6.0.3より前には、Content-Dispositionヘッダーの解析で処理時間が急増する問題があり、サービス拒否(DoS)の原因になります。multipart/form-dataを受け付けるhapiのルートでは、認証なしでNode.jsのイベントループを止められるおそれがあり、CVSSは7.5(高)です。修正版の@hapi/content 6.0.3へ更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| hapijscontent | — | Not listed |
| npm@hapi/content |
< 6.0.3→ 6.0.3 |
6.0.3 |
| npmcontent |
3.0.6 – 4.0.6→ Not listed |
Not listed |
Original description The description as published by the source.
@hapi/content provides HTTP Content-* header parsing. From 3.0.6 until 6.0.3, Content.disposition() uses an unanchored parameter-name expression in a global regular-expression scan, causing repeated failed matching over the remaining input when a Content-Disposition parameter contains a long token without an equals sign. The resulting quadratic processing can block the Node.js event loop before route handlers or validation when @hapi/pez parses multipart/form-data headers, including unauthenticated hapi routes with payload.multipart enabled, and also affects applications that pass untrusted headers directly to Content.disposition(). This issue is fixed in @hapi/content version 6.0.3.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- web github.com
- web github.com