製品・ソフトウェアに関する情報
benoitcのhackneyにおけるCRLF インジェクションの脆弱性
Title benoitcのhackneyにおけるCRLF インジェクションの脆弱性
Summary

benoitc hackneyにおけるCRLFシーケンスの不適切な無害化(「CRLFインジェクション」)の脆弱性により、HTTPリクエスト/レスポンス分割が可能になります。src/hackney_ws.erlのWebSocketアップグレードコードは、callerが渡すoptsマップからhost、path、headers(ExtraHeaders)、protocolsオプションをinit/1内で内部の#ws_data{}レコードにコピーし、その後do_handshake/1でバイナリ連結によりそれらを生のHTTP/1.1アップグレードリクエストにそのまま挿入します。これら4か所のインジェクション箇所のいずれでもCRLFやNULの除去は行われません。攻撃者は、例えば信頼できない入力からのURLの一部やヘッダー値をhackney_ws:start_link/1にフォワードすることで、これらのオプションのいずれかを制御可能であれば、任意のHTTPヘッダーを送信先WebSocketアップグレードリクエストに注入できます。これにより、ヘッダーインジェクションや上流サーバーに対する資格情報のなりすまし、ログやキャッシュの汚染、中間プロキシを介したリクエストスマグリングを引き起こす可能性があります。この問題はhackneyのバージョン2.0.0から4.0.1未満に影響があります。

Possible impacts ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアは停止しません。 
Solution

ベンダ情報を参照して適切な対策を実施してください。

Publication Date May 25, 2026, midnight
Registration Date June 3, 2026, 3:35 p.m.
Last Update June 3, 2026, 3:35 p.m.
CVSS3.0 : 重要
Score 7.5
Vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Affected System
benoitc
hackney 2.0.0 以上 4.0.1 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2026年06月03日]
  掲載
June 3, 2026, 3:35 p.m.

NVD Vulnerability Information
CVE-2026-47072
Summary

Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in benoitc hackney allows HTTP Request/Response Splitting. The WebSocket upgrade code in src/hackney_ws.erl copies the host, path, headers (ExtraHeaders), and protocols options from the caller-supplied opts map into the internal #ws_data{} record in init/1 and then splices them verbatim into the raw HTTP/1.1 upgrade request by binary concatenation in do_handshake/1. No CRLF or NUL stripping is performed at any of these four injection sites. An attacker who controls any of these options — for example by forwarding URL components or header values from untrusted input into hackney_ws:start_link/1 — can inject arbitrary HTTP headers into the outbound WebSocket upgrade request, leading to header injection, credential spoofing toward the upstream server, log and cache poisoning, or request smuggling via intermediary proxies.

This issue affects hackney: from 2.0.0 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 29, 2026, 5:27 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:* 2.0.0 4.0.1
Related information, measures and tools
Common Vulnerabilities List