| Title | benoitcのhackneyにおける無限ループに関する脆弱性 |
|---|---|
| Summary | benoitc hackneyにおける到達不能な終了条件を持つループ(いわゆる「無限ループ」)の脆弱性により、過剰なメモリ割り当てが発生します。src/hackney_altsvc.erl内のAlt-Svcレスポンスヘッダパーサは前方進行を保証しません。parse_token/2はトークンでも空白文字でもカンマでもないバイト(例:!, @, =, ;)を受け取ると、入力を変更せずにそのまま返します。skip_comma/1も最初のバイトがカンマでない場合にはバッファを変更せずに返します。その結果、parse_entries/2は同一データで再帰呼び出しを行い、CPUを100%使用し続ける密な無限テール再帰ループを生成します。呼び出し元のプロセスは決して戻りません。エントリポイントであるparse_and_cache/3は接続プロセス内で同期的に呼び出され、HTTPレスポンスごとに実行されます。1バイトのAlt-Svc: !レスポンスヘッダがハングを引き起こすのに十分であり、このヘッダはクライアントが接続する任意のHTTPオリジンにより完全に制御されています。この問題はhackneyの2.0.0-beta.1から4.0.1未満のバージョンに影響を与えます。 |
| Possible impacts | ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う情報について、書き換えは発生しません。 ・当該ソフトウェアが完全に停止する可能性があります。 |
| Solution | ベンダ情報を参照して適切な対策を実施してください。 |
| Publication Date | May 25, 2026, midnight |
| Registration Date | May 29, 2026, 11:19 a.m. |
| Last Update | May 29, 2026, 11:19 a.m. |
| CVSS3.0 : 重要 | |
| Score | 7.5 |
|---|---|
| Vector | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| benoitc |
| hackney 2.0.0 以上 4.0.1 未満 |
| No | Changed Details | Date of change |
|---|---|---|
| 1 | [2026年05月29日] 掲載 |
May 29, 2026, 11:19 a.m. |
| Summary | Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in benoitc hackney allows Excessive Allocation. The Alt-Svc response header parser in src/hackney_altsvc.erl does not guarantee forward progress. When parse_token/2 receives a non-token, non-whitespace, non-comma byte (e.g. !, @, =, ;), it returns the input unchanged. skip_comma/1 also returns the buffer unchanged when the first byte is not a comma. parse_entries/2 then recurses with identical data, creating a tight infinite tail-recursive loop that pins a scheduler at 100% CPU. The calling process never returns. The entry point parse_and_cache/3 is called synchronously in the connection process on every HTTP response. A single-byte Alt-Svc: ! response header is sufficient to trigger the hang; the header is fully controlled by any HTTP origin the client connects to. This issue affects hackney: from 2.0.0-beta.1 before 4.0.1. |
|---|---|
| Publication Date | May 26, 2026, 12:16 a.m. |
| Registration Date | May 27, 2026, 4:07 a.m. |
| Last Update | May 27, 2026, 10:54 p.m. |
| Configuration1 | or higher | or less | more than | less than | |
| cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:* | 2.0.0 | 4.0.1 | |||