製品・ソフトウェアに関する情報
Ruby-lang.orgのRubyにおける競合状態に関する脆弱性
Title Ruby-lang.orgのRubyにおける競合状態に関する脆弱性
Summary

Ruby 4のバージョン4.0.5より前に問題が発見されました。pthreadベースのgetaddrinfoタイムアウトハンドラ(ext/socket/raddrinfo.c内のrb_getaddrinfo)における競合状態により、use-after-freeが発生します。これにより、リモート攻撃者がユーザー指定のタイムアウト付近でDNS応答を遅延させることができ、Addrinfo.getaddrinfo(..., timeout:)またはSocket.tcp(..., resolv_timeout:)を呼び出すRubyプロセスをクラッシュさせる可能性があります。理論的には、この脆弱性を利用してメモリ破損を引き起こす攻撃も可能です。この攻撃は、例えば巧妙に作られた権威DNSサーバーや再帰的リゾルバを通じて実行される可能性があります。

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

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

Publication Date May 22, 2026, midnight
Registration Date May 28, 2026, 2:39 p.m.
Last Update May 28, 2026, 2:39 p.m.
CVSS3.0 : 重要
Score 8.1
Vector CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected System
Ruby-lang.org
Ruby 4.0.0 以上 4.0.5 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
Change Log
No Changed Details Date of change
1 [2026年05月28日]
  掲載
May 28, 2026, 2:39 p.m.

NVD Vulnerability Information
CVE-2026-46727
Summary

An issue was discovered in Ruby 4 before 4.0.5. A race condition leading to a use-after-free in the pthread-based getaddrinfo timeout handler (rb_getaddrinfo in ext/socket/raddrinfo.c) allows a remote attacker who can delay DNS responses near the user-specified timeout to crash a Ruby process that calls Addrinfo.getaddrinfo(..., timeout:) or Socket.tcp(..., resolv_timeout:). Memory-corruption-based exploitation is theoretically possible. The attack could, for example, be carried out through a crafted authoritative DNS server or recursive resolver.

Publication Date May 23, 2026, 3:16 a.m.
Registration Date May 27, 2026, 4:05 a.m.
Last Update May 26, 2026, 11:22 p.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* 4.0.0 4.0.5
Related information, measures and tools
Common Vulnerabilities List