Jruby: An issue was discovered in Ruby 4 before 4.0.5. (CVE-2026-46727)
Description
A race condition vulnerability in Ruby 4 versions before 4.0.5 allows remote attackers to cause a use-after-free in the pthread-based getaddrinfo timeout handler. This can crash the Ruby process when calling Addrinfo.getaddrinfo with a timeout or Socket.tcp with a resolv_timeout. Exploitation requires delaying DNS responses near the user-specified timeout, potentially via a malicious DNS server or resolver. A patch is available in Ruby 4.0.5.
CVSS v3.1
8.1high
Affected software
pkg:deb/ubuntu/jruby?arch=source&distro=esm-infra-legacy/trustypkg:deb/ubuntu/ruby2.3?arch=source&distro=esm-infra-legacy/xenialpkg:deb/ubuntu/jruby?arch=source&distro=xenialpkg:deb/ubuntu/ruby2.5?arch=source&distro=esm-infra/bionicpkg:deb/ubuntu/jruby?arch=source&distro=bionicpkg:deb/ubuntu/ruby2.7?arch=source&distro=esm-infra/focalpkg:deb/ubuntu/jruby?arch=source&distro=focalpkg:deb/ubuntu/ruby3.0?arch=source&distro=jammypkg:deb/ubuntu/jruby?arch=source&distro=noblepkg:deb/ubuntu/ruby3.2?arch=source&distro=noblepkg:deb/ubuntu/jruby?arch=source&distro=questingpkg:deb/ubuntu/ruby3.3?arch=source&distro=questingpkg:deb/ubuntu/jruby?arch=source&distro=stonkingpkg:deb/ubuntu/ruby3.3?arch=source&distro=stonkingpkg:deb/ubuntu/jruby?arch=source&distro=resolutepkg:deb/ubuntu/ruby3.3?arch=source&distro=resoluteRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-46727 describes a race condition vulnerability in Ruby 4 versions prior to 4.0.5. The flaw occurs in the pthread-based getaddrinfo timeout handler, where a use-after-free condition can be triggered. This vulnerability can cause the Ruby process to crash when functions such as Addrinfo.getaddrinfo with a timeout or Socket.tcp with a resolv_timeout are called. Exploitation requires an attacker to delay DNS responses close to the user-specified timeout, which could be achieved via a malicious DNS server or resolver. Although memory corruption exploitation is theoretically possible, the primary observed impact is a denial of service via process crash. Ruby 4.0.5 includes a patch that fixes this issue.
Potential Impact
Successful exploitation can cause a denial of service by crashing the Ruby process due to a use-after-free condition in the DNS resolution timeout handler. The vulnerability affects remote attackers who can manipulate DNS response timing. The CVSS score of 8.1 indicates high impact on confidentiality, integrity, and availability, but exploitation complexity is high due to the need to delay DNS responses precisely. No known exploits in the wild have been reported.
Mitigation Recommendations
An official patch is available in Ruby version 4.0.5. Users and administrators should upgrade to Ruby 4.0.5 or later to remediate this vulnerability. No additional mitigations are specified by the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BIT-ruby-2026-46727
- Osv Schema Version
- 1.6.2
- Aliases
- CVE-2026-46727
- Ecosystems
- Bitnami
- Database Specific Severity
- High
- State
- PUBLISHED
Threat ID: 6aa005c3acd9273b49ab5bf8
Added to database: 09/08/2026, 12:55:31 UTC
Last enriched: 10/18/2026, 05:40:56 UTC
Last updated: 10/24/2026, 08:45:11 UTC
Views: 52
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.