CVE-2011-2705: Input Validation

Published Jul 15, 2011
·
Updated

It was found that Ruby did not properly reinitialize the random number generator, when forking new Ruby process. A local attacker could use this flaw to easier predict random numbers.

References: [1] https://bugzilla.novell.com/showbug.cgi?id=704409 [2] http://www.ruby-lang.org/en/news/2011/07/02/ruby-1-8-7-p352-released/ [3] http://redmine.ruby-lang.org/issues/4579 [4] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=31713 [5] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=32050 [6] http://www.openwall.com/lists/oss-security/2011/07/11/1 [7] http://www.openwall.com/lists/oss-security/2011/07/12/14

Other sources

The SecureRandom.randombytes 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.

— MITRE

Affected Software

35 affected components
ruby-lang Ruby<=1.8.7-334
ruby-lang Ruby=1.8.7-p22
ruby-lang Ruby=1.8.7-p71
ruby-lang Ruby=1.8.7-p72
ruby-lang Ruby=1.8.7-160
ruby-lang Ruby=1.8.7-173
ruby-lang Ruby=1.8.7-248
ruby-lang Ruby=1.8.7-249
ruby-lang Ruby=1.8.7-299
ruby-lang Ruby=1.8.7-302
ruby-lang Ruby=1.8.7-330
ruby-lang Ruby=1.8.7-p21
ruby-lang Ruby=1.9
ruby-lang Ruby=1.9-r18423
ruby-lang Ruby=1.9.0
ruby-lang Ruby=1.9.0-r18423
ruby-lang Ruby=1.9.0-0
ruby-lang Ruby=1.9.0-1
ruby-lang Ruby=1.9.0-2
ruby-lang Ruby=1.9.0-20060415
ruby-lang Ruby=1.9.0-20070709
ruby-lang Ruby=1.9.1
ruby-lang Ruby=1.9.1--p0
ruby-lang Ruby=1.9.1--p129
ruby-lang Ruby=1.9.1--p243
ruby-lang Ruby=1.9.1--p376
ruby-lang Ruby=1.9.1--p429
ruby-lang Ruby=1.9.1--preview_1
ruby-lang Ruby=1.9.1--preview_2
ruby-lang Ruby=1.9.1--rc1
ruby-lang Ruby=1.9.1--rc2
ruby-lang Ruby=1.9.2
ruby-lang Ruby=1.9.2-dev
ruby-lang Ruby=1.9.2-p136
ruby-lang Ruby=1.9.2-p180

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.8.7-p352
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.9.2-p290

Event History

Jul 15, 2011
Data Sourced
09:51 AM
DescriptionSeverityAffected Software
Aug 5, 2011
CVE Published
via MITRE·09:00 PM
Data Sourced
via MITRE·09:00 PM
Description
Data Sourced
09:55 PM
Weakness
Data Sourced
via NVD·09:55 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 19, 2012
Data Sourced
03:58 AM
Remedy
Feb 24, 2021
Data Sourced
via Red Hat·03:03 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2011-2705?

CVE-2011-2705 is considered to have moderate severity due to its impact on the predictability of random number generation in Ruby.

2

How do I fix CVE-2011-2705?

To fix CVE-2011-2705, upgrade to Ruby version 1.8.7-p352 or later, or 1.9.2-p290 or later.

3

What are the affected versions by CVE-2011-2705?

CVE-2011-2705 affects Ruby versions before 1.8.7-p352 and all 1.9.x versions prior to 1.9.2-p290.

4

What type of vulnerability is CVE-2011-2705?

CVE-2011-2705 is a vulnerability related to insufficient randomness in cryptographic functions.

5

Who can be affected by CVE-2011-2705?

Context-dependent attackers who can predict random strings generated by vulnerable Ruby versions can be affected by CVE-2011-2705.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203