CVE-2021-4241: PHPServerMon PRNG has Insufficient Entropy
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.33481%
CWE
Published
11/16/2022
Updated
7/19/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
phpservermon/phpservermon | composer | < 3.6.0 | 3.6.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the use of mt_rand() in the token generation process within newRememberMeCookie. The commit bb10a5f explicitly replaces mt_rand with cryptographically secure random_bytes(64), addressing CWE-1241 (Predictable RNG). While setUserLoggedIn is mentioned in vulnerability descriptions, the actual vulnerable implementation was in newRememberMeCookie which it calls. The high confidence comes from: 1) Direct match between patched code location and vulnerability description 2) mt_rand() being a well-known insecure PRNG 3) Explicit CWE mapping to predictable RNG usage in the commit message.