RubyApplication · Ruby Lang

CVE-2008-2662

HIGH · 10.0 CVSS v2.0 Published 2008-06-24
Fix available
A fix is available. Upgrade to 1.8.5.231 / 1.8.6.230 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Multiple integer overflows in the rb_str_buf_append function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, 1.8.7 before 1.8.7-p22, and 1.9.0 before 1.9.0-2 allow context-dependent attackers to execute arbitrary code or cause a denial of service via unknown vectors that trigger memory corruption, a different issue than CVE-2008-2663, CVE-2008-2664, and CVE-2008-2725. NOTE: as of 20080624, there has been inconsistent usage of multiple CVE identifiers related to Ruby. This CVE description should be regarded as authoritative, although it is likely to change.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis
How this class of weakness works · CWE-189

A legacy NVD category grouping numeric mistakes — overflows, truncation, sign errors — where a miscalculated value goes on to drive a dangerous decision such as a memory allocation or a bounds check. It is a bucket rather than one specific bug. Remediation is checked arithmetic and validating any computed size or index before it is used.

General guidance for the numeric errors class — the official description and references above are authoritative for this specific CVE. Want a bespoke review and a reviewed fix? Ask our team →

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
RubyApplication
Affected:<= 1.8.4> 1.8.5, < 1.8.5.231>= 1.8.6, < 1.8.6.230>= 1.8.7, < 1.8.7.22>= 1.9.0, < 1.9.0.2
Debian LinuxOperating system
Affected:= 4.0
Ubuntu LinuxOperating system
Affected:= 6.06= 7.04= 7.10= 8.04

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Authentication
None
Confidentiality
Complete
Integrity
Complete
Availability
Complete

AV:N/AC:L/Au:N/C:C/I:C/A:C

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.8.5.231 / 1.8.6.230 / 1.8.7.22 or later
Fixed in 1.8.5.2311.8.6.2301.8.7.22
Vendor patch www.ruby-lang.org →
Recommended fix High confidence

Ruby 1.8.7-p22 or later (minimum fixed version); ideally upgrade to Ruby 2.x+ as 1.8.x is end-of-life

  1. Check current Ruby version with: ruby --version
  2. For Debian/Ubuntu, update package lists: sudo apt-get update
  3. Upgrade Ruby using: sudo apt-get install ruby (or specific version like ruby1.8)
  4. Verify the installed version matches or exceeds the fixed releases: 1.8.5-p231, 1.8.6-p230, or 1.8.7-p22
  5. Alternatively, install from source: download Ruby 1.8.7-p22 or later from https://www.ruby-lang.org/en/downloads/
  6. Build and install: ./configure && make && sudo make install
  7. Verify upgrade: ruby --version
Caveat Ruby 1.8.x is obsolete; upgrading to modern Ruby 2.x/3.x will likely require code changes due to deprecated APIs and syntax differences

Generated from the published advisory — verify against the referenced sources before acting.

We can perform the upgrade in your staging environment and verify nothing breaks — typical engagement from $1,950. Get the upgrade done

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2008-2662 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2008-2662 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data