MtrudelのBanditにおける制限またはスロットリング無しのリソースの割り当てに関する脆弱性
タイトル MtrudelのBanditにおける制限またはスロットリング無しのリソースの割り当てに関する脆弱性
概要

mtrudel banditのリソース割り当てに制限やスロットリングがない脆弱性により、認証されていないリモート攻撃者がメモリ枯渇を引き起こしてサービス拒否(DoS)を発生させる可能性があります。lib/bandit/http1/socket.exの'Elixir.Bandit.HTTP1.Socket':read_data/2のチャンク形式の読み取り処理は、HTTP/1チャンク付きリクエストボディを読み込む際に、呼び出し元が指定した:lengthオプションを無視します。設定された制限(例:Plug.Parsersのデフォルト8MB)で蓄積ボディを制限する代わりに、do_read_chunked_data!/5関数は受信したすべてのチャンクを無条件にiolistにバッファし、ボディ全体を単一のバイナリとして具現化します。この関数は常に{:ok, body, ...}を返すため、呼び出し元は413レスポンスを返すことができません。標準的なPhoenixエンドポイントではPlug.Parsersがルーティングや認証の前に実行されるため、認証されていない攻撃者は有効なルートや認証情報を必要としません。任意のパスに対して任意の大きさのボディを持つ1つのTransfer-Encoding: chunkedのPOSTリクエストを送信すると、BEAMプロセスが利用可能なメモリを枯渇させ、OSのOOMキラーによって終了されます。同じ関数内のcontent-lengthの処理は正しく制限を適用しており、影響を受けません。この問題はbanditのバージョン1.4.0から1.11.1未満に影響します。

想定される影響 当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 また、当該ソフトウェアが扱う情報について、書き換えは発生しません。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

公表日 2026年5月13日0:00
登録日 2026年5月25日10:25
最終更新日 2026年5月25日10:25
CVSS3.0 : 重要
スコア 7.5
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Mtrudel
Bandit 1.4.0 以上 1.11.1 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年05月25日]
  掲載
2026年5月25日10:25

NVD脆弱性情報
CVE-2026-39803
概要

Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion.

The chunked clause of 'Elixir.Bandit.HTTP1.Socket':read_data/2 in lib/bandit/http1/socket.ex ignores the caller-supplied :length option when reading HTTP/1 chunked request bodies. Instead of capping the accumulated body at the configured limit (e.g. Plug.Parsers' default 8 MB), do_read_chunked_data!/5 buffers every received chunk into an iolist unconditionally and materializes the entire body as a single binary. The function always returns {:ok, body, ...}, so callers cannot interpose a 413 response.

Because Plug.Parsers runs before routing and authentication in the standard Phoenix endpoint, an unauthenticated attacker needs no valid route or credentials. Sending a single Transfer-Encoding: chunked POST request with an arbitrarily large body to any path causes the BEAM process to exhaust available memory and be terminated by the OS OOM killer.

The content-length path in the same function correctly enforces the limit and is not affected.

This issue affects bandit: from 1.4.0 before 1.11.1.

公表日 2026年5月13日23:17
登録日 2026年5月15日4:20
最終更新日 2026年5月14日1:16
関連情報、対策とツール
共通脆弱性一覧