Skip to content
OpenAdvisories
Unscored CVE-2011-2705 EUVD-2011-2686GHSA-wj5x-c2v9-7wwr

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 fo…

Published Aug 5, 2011 · Updated Aug 6, 2024 · Assigned by redhat

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 6.0 ruby1.8 1.8.7.302-2squeeze3 DLA-88-1
Debian 6.0 ruby1.9.1 1.9.2.0-2+deb6u4 DLA-235-1
ReleasePackageFixed inAdvisory
RHEL 6 ruby +8 1.8.7.352-3.el6 RHSA-2011:1581
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 ruby3.3 +5 3.3.10-23.1.hum1 RHSA-2026:7305
Red Hat Hardened Images 1 ruby3.4 +5 3.4.8-31.1.hum1 RHSA-2026:7307
Red Hat Hardened Images 1 ruby4.0 +5 4.0.0-33.3.hum1 RHSA-2026:8838

Advisories 6

References