Skip to main content

Ruby EUVDEUVD-2026-31477

| CVE-2026-46727 HIGH
Race Condition (CWE-362)
2026-05-22 mitre GHSA-jfc8-2xw7-c79m
High
Disputed · 8.1 Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Ruby service resolving attacker-controlled hostname
  2. Delivery
    Submit input causing lookup with timeout option
  3. Exploit
    Delay DNS response near timeout boundary
  4. Execution
    Trigger race in rb_getaddrinfo timeout handler
  5. Persist
    Use-after-free corrupts addrinfo struct
  6. Impact
    Crash Ruby process (DoS) or pivot to memory corruption

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Concurrency control, locking
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The target application must call Addrinfo.getaddrinfo with the timeout: keyword argument or Socket.tcp with the resolv_timeout: keyword argument on a Ruby 4.x interpreter older than 4.0.5 - code that resolves names without those timeout options is not on the vulnerable path. The attacker additionally needs the ability to influence DNS responses observed by the victim near that user-specified timeout value, either by operating the authoritative name server for a hostname the application looks up or by controlling/MITM-ing the recursive resolver. No authentication or user interaction is required (PR:N/UI:N), but CVSS attack complexity is High (AC:H) because the attacker must reliably land the DNS reply within the narrow timing window that triggers the race, which limits opportunistic mass exploitation.

Impact

The CVSS 3.1 score of 8.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) reflects an unauthenticated, network-reachable bug that nonetheless requires winning a timing race - hence the High attack complexity. CIA all rated High is driven by the theoretical memory-corruption path; in practice the reliable outcome is crashing the Ruby process (denial of service), which the description and tags emphasize. EPSS, KEV, and SSVC data were not supplied, and no public exploit identified at time of analysis, so real-world exploitation pressure appears low at this point. Realistic priority: high for internet-facing Ruby services that resolve attacker-influenced hostnames with timeout: (e.g., webhook fetchers, SSRF-adjacent crawlers, mail relays) because an attacker controlling an authoritative DNS server or recursive resolver can repeatedly trigger the race; lower for internal applications resolving only trusted names.

Exploit ScenarioDerived

An attacker who controls (or can MITM) the authoritative DNS server or recursive resolver consulted by a Ruby service repeatedly induces lookups for a hostname they own - for instance by sending webhook URLs, image URLs, or email addresses pointing at their domain - and delays each DNS response to land within microseconds of the application's configured timeout. Each well-timed reply triggers the race in rb_getaddrinfo and crashes the Ruby worker, producing a denial of service against the application; with sufficient control of heap state, the same primitive is theoretically usable for memory corruption, though no public exploit identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 22, 2026

Use-after-free in Ruby 4.x (before 4.0.5) lets remote attackers who can manipulate DNS response timing crash applications calling Addrinfo.getaddrinfo with a timeout: option or Socket.tcp with resolv_timeout:. The flaw lives in the pthread-based getaddrinfo timeout handler (rb_getaddrinfo in ext/socket/raddrinfo.c) and, while reliably exploitable for denial of service, also raises a theoretical possibility of memory-corruption-based code execution. No public exploit identified at time of analysis.

RemediationAI

Vendor-released patch: Ruby 4.0.5 - upgrade any Ruby 4.x installation to 4.0.5 or later as described in the official advisory at https://www.ruby-lang.org/en/news/2026/05/20/getaddrinfo-cve-2026-46727/. If immediate upgrade is not possible, the most direct workaround is to stop passing the timeout: argument to Addrinfo.getaddrinfo and the resolv_timeout: argument to Socket.tcp, which avoids the vulnerable pthread timeout path entirely; the trade-off is that name resolution will then block for the OS-level resolver timeout, potentially extending request latency under DNS failure. As a second compensating control, restrict outbound DNS for affected services to a trusted internal resolver and prevent the application from resolving attacker-controlled hostnames (e.g., validate or allowlist URLs before fetching), accepting the operational cost of an SSRF-style allowlist. Monitor for unexpected interpreter crashes / SIGSEGV in Ruby workers as a detection signal while patching is in progress.

Affected VersionsENISA

Ruby 4.0.0 <4.0.5

Affected Packages

euvd ruby fix: 4.0.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability is a CWE-362 race condition in Ruby's C-level networking layer. Ruby's socket extension wraps the libc getaddrinfo(3) resolver call in a pthread-backed worker so it can be cancelled when the user-supplied timeout: / resolv_timeout: expires. When the DNS reply arrives at almost the same instant the timeout fires, the timeout path and the worker thread race over the heap-allocated addrinfo result structure, leading to a use-after-free in rb_getaddrinfo. The affected component is the Ruby interpreter itself (cpe:2.3:a:ruby-lang:ruby), so any Ruby-based application or service performing name resolution with an explicit timeout - common in HTTP clients, job workers, and microservice frameworks - inherits the bug.

Know when Ruby gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Low–High)
Vendor (mitre) PRIMARY 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
SUSE 3.1 LOW
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Ruby 4.x (before 4.0.5) contains a use-after-free vulnerability enabling remote denial-of-service attacks against applications using DNS resolution timeouts; affected systems can be reliably crashed by remote attackers, creating immediate service availability risk. No vendor patch is currently available.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable timeout: and resolv_timeout: options in affected code if operations permit, (2) Implement network-level DNS rate limiting and anomaly detection, (3) Deploy application monitoring for unexpected crashes with auto-restart capabilities, (4) Restrict DNS resolution operations to essential use cases only, (5) Establish rapid incident response procedures for affected applications.

Threat Intelligence Overview

EPSS Score
0.1%
Top 72% exploitable
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

60
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Race conditions occur when multiple concurrent requests exploit the brief time gap between checking a condition and acting upon it (TOCTOU - Time of Check, Time of Use).

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Ruby

View all
CVE-2017-17405 HIGH POC
8.8 Dec 15

Ruby before 2.4.3 allows Net::FTP command injection. Rated high severity (CVSS 8.8), this vulnerability is remotely expl

CVE-2017-17790 CRITICAL POC
9.8 Dec 20

The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injectio

CVE-2017-14064 CRITICAL POC
9.8 Aug 31

Ruby through 2.2.7, 2.3.x through 2.3.4, and 2.4.x through 2.4.1 can expose arbitrary memory during a JSON.generate call

CVE-2016-2336 CRITICAL POC
9.8 Jan 06

Type confusion exists in two methods of Ruby's WIN32OLE class, ole_invoke and ole_query_interface. Rated critical severi

CVE-2026-77602 CRITICAL POC
9.9 Sep 23

Authenticated remote code execution in OpenC3 COSMOS (Ruby gem 'openc3' versions 5.1.0 through 7.2.1) lets any logged-in

CVE-2016-2337 CRITICAL POC
9.8 Jan 06

Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2016-2339 CRITICAL POC
9.8 Jan 06

An exploitable heap overflow vulnerability exists in the Fiddle::Function.new "initialize" function functionality of Rub

CVE-2017-9225 CRITICAL POC
9.8 May 24

An issue was discovered in Oniguruma 6.2.0, as used in Oniguruma-mod in Ruby through 2.4.1 and mbstring in PHP through 7

CVE-2026-27614 CRITICAL POC
9.3 Feb 25

Stored XSS in Bugsink error tracking tool before 2.0.13 allows unauthenticated attackers to inject persistent scripts th

CVE-2017-0898 CRITICAL POC
9.1 Sep 15

Ruby before 2.4.2, 2.3.5, and 2.2.8 is vulnerable to a malicious format string which contains a precious specifier (*) w

CVE-2013-4164 MEDIUM POC
6.8 Nov 23

Heap-based buffer overflow in Ruby 1.8, 1.9 before 1.9.3-p484, 2.0 before 2.0.0-p353, 2.1 before 2.1.0 preview2, and tru

CVE-2026-71847 HIGH POC
8.7 Aug 07

Heap-use-after-free in the Ruby json gem's native C extension (versions 2.20.0 through 2.21.1) allows an unauthenticated

Vendor StatusVendor

SUSE

Severity: Low
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy