CVE-2026-46727
JSON

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 packageVersionsReported by
ruby-lang Rubyfrom 4.0.0 before 4.0.5CVE List, NVD
ruby (Bitnami)from 4.0.0 before 4.0.5Bitnami Vulnerability Database
ruby-min (Bitnami)from 4.0.0 before 4.0.5Bitnami Vulnerability Database

All scores

mitre8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasehigh rating

Classification

CWE-362

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

Sources

SourceRecordLicence
CVE ListCVE-2026-46727 changed 2026-05-22CVE Terms of Use
NVDCVE-2026-46727 changed 2026-07-23Public domain
Bitnami Vulnerability DatabaseBIT-RUBY-2026-46727 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-RUBY-MIN-2026-46727 changed 2026-09-08Apache-2.0