Skip to main content
EPSS 0.5%top 59%

Jruby: An issue was discovered in Ruby 4 before 4.0.5. (CVE-2026-46727)

0
Medium
Published: 05/22/2026 (05/22/2026, 18:16:00 UTC)
Source: GCVE Database
Product: jruby

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

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected software

Bitnamimore threats →ghsa
ruby
pkg:bitnami/ruby
Affected versions
>=4.0.0 <4.0.5
Ubuntu:Pro:14.04:LTSmore threats →ghsa
jruby
pkg:deb/ubuntu/jruby?arch=source&distro=esm-infra-legacy/trusty
Affected versions
=1.5.6-5ubuntu1=1.5.6-6=1.5.6-7=1.5.6-9+deb8u2build0.14.04.1~esm2
Ubuntu:Pro:16.04:LTSmore threats →ghsa
ruby2.3
pkg:deb/ubuntu/ruby2.3?arch=source&distro=esm-infra-legacy/xenial
Affected versions
=2.3.0-1=2.3.0-2=2.3.0-4ubuntu2=2.3.0-4ubuntu3=2.3.0-5ubuntu1=2.3.1-2~16.04=2.3.1-2~16.04.2=2.3.1-2~16.04.4=2.3.1-2~16.04.5=2.3.1-2~16.04.6=2.3.1-2~16.04.7=2.3.1-2~16.04.9=2.3.1-2~16.04.10=2.3.1-2~16.04.11=2.3.1-2~16.04.12=2.3.1-2~ubuntu16.04.13=2.3.1-2~ubuntu16.04.14=2.3.1-2~ubuntu16.04.15=2.3.1-2~ubuntu16.04.16=2.3.1-2~ubuntu16.04.16+esm1=2.3.1-2~ubuntu16.04.16+esm2=2.3.1-2~ubuntu16.04.16+esm3=2.3.1-2~ubuntu16.04.16+esm4=2.3.1-2~ubuntu16.04.16+esm5=2.3.1-2~ubuntu16.04.16+esm6=2.3.1-2~ubuntu16.04.16+esm7=2.3.1-2~ubuntu16.04.16+esm8=2.3.1-2~ubuntu16.04.16+esm9=2.3.1-2~ubuntu16.04.16+esm10=2.3.1-2~ubuntu16.04.16+esm11=2.3.1-2~ubuntu16.04.16+esm12=2.3.1-2~ubuntu16.04.16+esm14=2.3.1-2~ubuntu16.04.16+esm15
Ubuntu:16.04:LTSmore threats →ghsa
jruby
pkg:deb/ubuntu/jruby?arch=source&distro=xenial
Affected versions
=1.7.21-2ubuntu4=1.7.22-1ubuntu1
Ubuntu:Pro:18.04:LTSmore threats →ghsa
ruby2.5
pkg:deb/ubuntu/ruby2.5?arch=source&distro=esm-infra/bionic
Affected versions
=2.5.0~preview1-1ubuntu2=2.5.0-4ubuntu1=2.5.0-4ubuntu4=2.5.0-5ubuntu1=2.5.0-6ubuntu1=2.5.1-1ubuntu1=2.5.1-1ubuntu1.1=2.5.1-1ubuntu1.2=2.5.1-1ubuntu1.4=2.5.1-1ubuntu1.5=2.5.1-1ubuntu1.6=2.5.1-1ubuntu1.7=2.5.1-1ubuntu1.8=2.5.1-1ubuntu1.9=2.5.1-1ubuntu1.10=2.5.1-1ubuntu1.11=2.5.1-1ubuntu1.12=2.5.1-1ubuntu1.13=2.5.1-1ubuntu1.14=2.5.1-1ubuntu1.15=2.5.1-1ubuntu1.16=2.5.1-1ubuntu1.16+esm1=2.5.1-1ubuntu1.16+esm3=2.5.1-1ubuntu1.16+esm4=2.5.1-1ubuntu1.16+esm5=2.5.1-1ubuntu1.16+esm6=2.5.1-1ubuntu1.16+esm7=2.5.1-1ubuntu1.16+esm8
Ubuntu:18.04:LTSmore threats →ghsa
jruby
pkg:deb/ubuntu/jruby?arch=source&distro=bionic
Affected versions
=9.1.13.0-1=9.1.17.0-1~18.04
Ubuntu:Pro:20.04:LTSmore threats →ghsa
ruby2.7
pkg:deb/ubuntu/ruby2.7?arch=source&distro=esm-infra/focal
Affected versions
=2.7.0-1=2.7.0-2=2.7.0-3=2.7.0-4=2.7.0-4ubuntu1=2.7.0-5ubuntu1=2.7.0-5ubuntu1.1=2.7.0-5ubuntu1.2=2.7.0-5ubuntu1.3=2.7.0-5ubuntu1.4=2.7.0-5ubuntu1.5=2.7.0-5ubuntu1.6=2.7.0-5ubuntu1.7=2.7.0-5ubuntu1.8=2.7.0-5ubuntu1.9=2.7.0-5ubuntu1.10=2.7.0-5ubuntu1.11=2.7.0-5ubuntu1.12=2.7.0-5ubuntu1.13=2.7.0-5ubuntu1.14=2.7.0-5ubuntu1.15=2.7.0-5ubuntu1.16=2.7.0-5ubuntu1.17=2.7.0-5ubuntu1.18=2.7.0-5ubuntu1.18+esm1=2.7.0-5ubuntu1.18+esm3=2.7.0-5ubuntu1.18+esm4=2.7.0-5ubuntu1.18+esm5
Ubuntu:20.04:LTSmore threats →ghsa
jruby
pkg:deb/ubuntu/jruby?arch=source&distro=focal
Affected versions
=9.1.17.0-3=9.1.17.0-3build5=9.1.17.0-3build6
Ubuntu:22.04:LTSmore threats →ghsa
ruby3.0
pkg:deb/ubuntu/ruby3.0?arch=source&distro=jammy
Affected versions
=3.0.2-5ubuntu1=3.0.2-7=3.0.2-7ubuntu2=3.0.2-7ubuntu2.1=3.0.2-7ubuntu2.2=3.0.2-7ubuntu2.3=3.0.2-7ubuntu2.4=3.0.2-7ubuntu2.5=3.0.2-7ubuntu2.6=3.0.2-7ubuntu2.7=3.0.2-7ubuntu2.8=3.0.2-7ubuntu2.10=3.0.2-7ubuntu2.11=3.0.2-7ubuntu2.12=3.0.2-7ubuntu2.13
Ubuntu:24.04:LTSmore threats →ghsa
jruby
pkg:deb/ubuntu/jruby?arch=source&distro=noble
Affected versions
=9.3.9.0+ds-1=9.4.5.0+ds-1=9.4.5.0+ds-1ubuntu1=9.4.6.0+ds-1ubuntu3
Ubuntu:24.04:LTSmore threats →ghsa
ruby3.2
pkg:deb/ubuntu/ruby3.2?arch=source&distro=noble
Affected versions
=3.2.3-1=3.2.3-1build2=3.2.3-1build3=3.2.3-1ubuntu0.24.04.1=3.2.3-1ubuntu0.24.04.3=3.2.3-1ubuntu0.24.04.5=3.2.3-1ubuntu0.24.04.6=3.2.3-1ubuntu0.24.04.7=3.2.3-1ubuntu0.24.04.8
Ubuntu:25.10more threats →ghsa
jruby
pkg:deb/ubuntu/jruby?arch=source&distro=questing
Affected versions
=9.4.8.0+ds-2ubuntu1=9.4.8.0+ds-3ubuntu1
Ubuntu:25.10more threats →ghsa
ruby3.3
pkg:deb/ubuntu/ruby3.3?arch=source&distro=questing
Affected versions
=3.3.7-1ubuntu2=3.3.8-2ubuntu1=3.3.8-2ubuntu2=3.3.8-2ubuntu2.1
Ubuntu:26.10more threats →ghsa
jruby
pkg:deb/ubuntu/jruby?arch=source&distro=stonking
Affected versions
=9.4.8.0+ds-3ubuntu1=9.4.14.0+ds-1
Ubuntu:26.10more threats →ghsa
ruby3.3
pkg:deb/ubuntu/ruby3.3?arch=source&distro=stonking
Affected versions
=3.3.8-2ubuntu3=3.3.8-2.2ubuntu4
Ubuntu:26.04:LTSmore threats →ghsa
jruby
pkg:deb/ubuntu/jruby?arch=source&distro=resolute
Affected versions
=9.4.8.0+ds-3ubuntu1
Ubuntu:26.04:LTSmore threats →ghsa
ruby3.3
pkg:deb/ubuntu/ruby3.3?arch=source&distro=resolute
Affected versions
=3.3.8-2ubuntu2=3.3.8-2ubuntu3=3.3.8-2ubuntu3.1

Run 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

AILast updated: 10/18/2026, 05:40:56 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses