8.1high
An issue was discovered in Ruby 4 before 4.0.5.
- Severity
- 8.1high CVSS:3.1 by mitre
- Exploit likelihood
- 0.48% (higher than 42% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- BIT-RUBY-2026-46727BIT-RUBY-MIN-2026-46727
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
| Product or package | Versions | Reported by |
|---|---|---|
| ruby-lang Ruby | from 4.0.0 before 4.0.5 | CVE List, NVD |
| ruby (Bitnami) | from 4.0.0 before 4.0.5 | Bitnami Vulnerability Database |
| ruby-min (Bitnami) | from 4.0.0 before 4.0.5 | Bitnami Vulnerability Database |
All scores
| mitre | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
Se descubrió un problema en Ruby 4 antes de 4.0.5. Una condición de carrera que conduce a un uso después de liberación en el gestor de tiempo de espera de getaddrinfo basado en pthread (rb_getaddrinfo en ext/socket/raddrinfo.c) permite a un atacante remoto que puede retrasar las respuestas DNS cerca del tiempo de espera especificado por el usuario bloquear un proceso de Ruby que llama a Addrinfo.getaddrinfo(..., timeout:) o Socket.tcp(..., resolv_timeout:). La explotación basada en corrupción de memoria es teóricamente posible. El ataque podría, por ejemplo, llevarse a cabo a través de un servidor DNS autoritativo manipulado o un resolvedor recursivo.
References
| https://hackerone.com/reports/3607434 | permissions-required, web | |
| https://www.ruby-lang.org/en/news/2026/05/20/getaddrinfo-cve-2026-46727/ | advisory, vendor-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-46727 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-46727 changed 2026-05-22 | CVE Terms of Use |
| NVD | CVE-2026-46727 changed 2026-07-23 | Public domain |
| Bitnami Vulnerability Database | BIT-RUBY-2026-46727 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-RUBY-MIN-2026-46727 changed 2026-09-08 | Apache-2.0 |