CyberSecBulletin
CVE-2022-28739NVD status: Modified

Ruby: Out-of-bounds Read

CVE-2022-28739 is a high-severity out-of-bounds read vulnerability in Ruby from Ruby-lang, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 2.6.10, 2.7.6, 3.0.4 as the first without the flaw, so updating Ruby to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 4.37% chance of exploitation within 30 days, which is in the top 8.58% of all scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Ruby to 2.6.10 or 2.7.6 or 3.0.4 or 3.1.2, whichever matches your release line, or a later version.
  2. Update macOS to 11.7.1 or 12.6.1, whichever matches your release line, or a later version.
  3. Read the advisory on ruby-lang.org for workarounds and exact fixed builds.
  4. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
Ruby-langRubybefore 2.6.10; 2.7.0 up to, but not including, 2.7.6; 3.0.0 up to, but not including, 3.0.4; 3.1.0 up to, but not including, 3.1.22.6.10, 2.7.6, 3.0.4, 3.1.2
DebianDebian Linux9.0; 10.0; 11.0Not stated
ApplemacOS11.0 up to, but not including, 11.7.1; 12.0 up to, but not including, 12.6.111.7.1, 12.6.1

Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
NoneNothing can be modified.
Availability
NoneAvailability is not affected.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.5HighNVD
CVSS 2.04.3MediumNVD

Official description

There is a buffer over-read in Ruby before 2.6.10, 2.7.x before 2.7.6, 3.x before 3.0.4, and 3.1.x before 3.1.2. It occurs in String-to-Float conversion, including Kernel#Float and String#to_f.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Out-of-bounds Read

The product reads data past the end, or before the beginning, of the intended buffer.

How developers prevent this class of flaw

  • Use a language that provides appropriate memory abstractions.

More Out-of-bounds Read vulnerabilities (CWE-125)

Timeline

  1. CVE record published.
  2. Record last changed materially (score, affected products, status or references).

References

Third-party and government advisories

Other vulnerabilities in Ruby

All Ruby vulnerabilities

Recent Out-of-bounds Read vulnerabilities

Spotted an error? Tell us.