Skip to main content
VulnerabilityPublished

CVE-2026-46727: Ruby · Race Condition

Affects RubySource CVE Database V5

0
Compare

Not known to be exploited · CVSS 8.1 High : upgrade to 4.0.5 soon.

Data as of 30 Oct 2026, 06:59 UTC

CVSS 3.1 base score
8.1High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.4% chance of exploitation in 30 days – higher than 41% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 4.0.5
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 22 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.

What to do

Upgrade Ruby to 4.0.5.

Affected software

ProductAffectedFixed in
ruby-langRubyAffected
  • >=4.0.0 <4.0.5
Fixed in
  • 4.0.5
RubyGemsrubypkg:gem/rubyOther threatsAffected
  • =4.0.0
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Until then, consider avoiding or limiting use of Addrinfo.getaddrinfo(..., timeout:) and Socket.tcp(..., resolv_timeout:) with untrusted DNS sources or implement external DNS resolution safeguards.

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.

References

Community reviews

Loading reviews…