CVE-2026-46727
Apache Ruby Use-After-Free Remote Crash and Corruption Vulnerability
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.
INFO
Published Date :
May 22, 2026, 6:16 p.m.
Last Modified :
May 26, 2026, 2:22 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | 8254265b-2729-46b6-b9e3-3dfca2d5bfca | ||||
| CVSS 3.1 | HIGH | MITRE-CVE | ||||
| CVSS 3.1 | HIGH | [email protected] |
Solution
- Update Ruby to version 4.0.5 or later.
- Apply relevant security patches for your Ruby installation.
- Review DNS response handling and timeout configurations.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-46727.
| URL | Resource |
|---|---|
| https://hackerone.com/reports/3607434 | Permissions Required |
| https://www.ruby-lang.org/en/news/2026/05/20/getaddrinfo-cve-2026-46727/ | Vendor Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-46727 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-46727
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-46727 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-46727 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
May. 26, 2026
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* versions from (including) 4.0.0 up to (excluding) 4.0.5 Added Reference Type MITRE: https://hackerone.com/reports/3607434 Types: Permissions Required Added Reference Type MITRE: https://www.ruby-lang.org/en/news/2026/05/20/getaddrinfo-cve-2026-46727/ Types: Vendor Advisory -
New CVE Received by [email protected]
May. 22, 2026
Action Type Old Value New Value Added 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. Added CVSS V3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Added CWE CWE-362 Added Reference https://hackerone.com/reports/3607434 Added Reference https://www.ruby-lang.org/en/news/2026/05/20/getaddrinfo-cve-2026-46727/