Insufficient Entropy in PHP - CVE-2008-2108

 

Insufficient Entropy in PHP - CVE-2008-2108

Published: February 15, 2024 / Updated: June 8, 2025


Vulnerability identifier: #VU110345
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2008-2108
CWE-ID: CWE-331
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to execute arbitrary code.

The GENERATE_SEED macro in PHP 4.x before 4.4.8 and 5.x before 5.2.5, when running on 64-bit systems, performs a multiplication that generates a portion of zero bits during conversion due to insufficient precision, which produces 24 bits of entropy and simplifies brute force attacks against protection mechanisms that use the rand and mt_rand functions.


Affected software

PHP

How to mitigate CVE-2008-2108

Install update from vendor's website.

PHP - update to 5.2.5

External References

Related Security Bulletins