req_llm のWebSocketで証明書未検証、1.29.0で修正
Summary
Elixir 向けライブラリ req_llm の 1.9.0 以上 1.29.0 未満では、OpenAI への WebSocket 接続で相手のサーバー証明書を検証せず、通信経路上の攻撃者に API キーなどを盗み見られるおそれがあります。WebSocket 経由で OpenAI の Responses、Realtime、Codex を使っているアプリケーションが対象です。1.29.0 へ更新し、該当する場合は API キーやアクセストークンの再発行も検討してください。
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
Elixir 向けライブラリ req_llm の 1.9.0 以上 1.29.0 未満では、OpenAI への WebSocket 接続で相手のサーバー証明書を検証せず、通信経路上の攻撃者に API キーなどを盗み見られるおそれがあります。WebSocket 経由で OpenAI の Responses、Realtime、Codex を使っているアプリケーションが対象です。1.29.0 へ更新し、該当する場合は API キーやアクセストークンの再発行も検討してください。
Affected packages
| Ecosystem | Package | Affected | Fixed |
|---|---|---|---|
| agentjido | req_llm |
≥ a389d718640ceb2d541a8f540ab954cbf5ef8313, < c7264fc0217fbacfb5562234ff790b8e4462de76 |
c7264fc0217fbacfb5562234ff790b8e4462de76 |
| Hex | req_llm |
≥ 1.9.0, < 1.29.0 |
1.29.0 |
Original description The description as published by the source.
Improper Certificate Validation vulnerability in the WebSocket streaming client in agentjido req_llm allows an on-path attacker to read and modify OpenAI WebSocket sessions, including the authorization bearer token, via a TLS certificate the client does not trust. ReqLLM.Streaming.WebSocketSession.Client.start/3 in lib/req_llm/streaming/web_socket_session/client.ex starts WebSockex without TLS options, and WebSockex defaults to insecure: true, which connects with verify: :verify_none. The option allowlist also drops any caller-supplied cacerts or ssl_options, so an application cannot turn verification on.
The OpenAI Responses, Realtime, and Codex WebSocket paths reach this client and send the API key or OAuth access token in the authorization header. HTTP streaming through Finch and the HTTP/2 duplex session through Mint verify certificates and are not affected.
This issue affects req_llm: from 1.9.0 before 1.29.0.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package hex.pm
- package github.com
- patch github.com
- patch github.com
- web cna.erlef.org
- web osv.dev
- web github.com
- web github.com
- web repo.hex.pm