Live threats

All CVEs / Ruby-lang

CVE-2011-2705Ruby-lang Ruby

Medium 5.0 No auth needed

Priority
45
CVSS 2.0
5.0
EPSS
2.2%
probability of exploitation in 30 days · percentile 84
Auth required
No
Published
Aug 5, 2011
Updated
Jun 16, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-20
Vector
AV:N/AC:L/Au:N/C:P/I:N/A:N

What happens

The SecureRandom.random_bytes function in lib/securerandom.rb in Ruby before 1.8.7-p352 and 1.9.x before 1.9.2-p290 relies on PID values for initialization, which makes it easier for context-dependent attackers to predict the result string by leveraging knowledge of random strings obtained in an earlier process with the same PID.

Original NVD text.

What to do

  1. Apply the vendor's security update for Ruby.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected products (CPE)

VendorProductVersions
ruby-langruby≤ 1.8.7-334
ruby-langruby1.8.7
ruby-langruby1.8.7
ruby-langruby1.8.7
ruby-langruby1.8.7-160
ruby-langruby1.8.7-173
ruby-langruby1.8.7-248
ruby-langruby1.8.7-249
ruby-langruby1.8.7-299
ruby-langruby1.8.7-302
ruby-langruby1.8.7-330
ruby-langruby1.8.7-p21
ruby-langruby1.9
ruby-langruby1.9
ruby-langruby1.9.0
ruby-langruby1.9.0
ruby-langruby1.9.0-0
ruby-langruby1.9.0-1
ruby-langruby1.9.0-2
ruby-langruby1.9.0-20060415
ruby-langruby1.9.0-20070709
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.1
ruby-langruby1.9.2
ruby-langruby1.9.2
ruby-langruby1.9.2-p136
ruby-langruby1.9.2-p180

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.