Skip to content
OpenAdvisories
High · 8.1 CVE-2026-46727 EUVD-2026-31477GHSA-jfc8-2xw7-c79m

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 handl…

Published May 22, 2026 · Updated May 22, 2026 · Assigned by mitre

Description

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.

Affected products

VendorProductAffectedFixed
ruby-lang Ruby 4.0.0 – < 4.0.5 4.0.5

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 26.10 jruby +1 No fix yet —
Ubuntu 26.04 LTS jruby +1 No fix yet —
Ubuntu 25.10 jruby +1 No fix yet —
Ubuntu 24.04 LTS jruby +1 No fix yet —
Ubuntu 22.04 LTS ruby3.0 No fix yet —
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS jruby No fix yet —
Ubuntu 18.04 LTS jruby No fix yet —
Ubuntu 16.04 LTS jruby No fix yet —
Ubuntu Pro 20.04 LTS ruby2.7 No fix yet —
Ubuntu Pro 18.04 LTS ruby2.5 No fix yet —
Ubuntu Pro 16.04 LTS ruby2.3 No fix yet —
Ubuntu Pro 14.04 LTS jruby No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed ruby4.0 4.0.5-1.1 openSUSE-SU-2026:10839-1

Advisories 2

References