CVE-2021-4241: Phpservermon/phpservermon PHPServerMon PRNG Has Insufficient Entropy Vulnerability
MODERATECVE-2021-4241 is a MODERATE (CVSS 5.3) phpservermon prng has insufficient entropy vulnerability (CWE-1241: Use of Predictable Algorithm in Random Number Generator) affecting Phpservermon/phpservermon libraries in the Packagist ecosystem. The issue involves phpservermon prng has insufficient entropy. Remediation is available by upgrading affected packages to version 3.6.0.
CVE-2021-4241 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2021-4241
To remediate this vulnerability, upgrade all affected Phpservermon/phpservermon dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade phpservermon/phpservermon to 3.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for phpservermon/phpservermon
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-4241, inspect your project dependencies for Phpservermon/phpservermon:
inspect dependencies for phpservermon/phpservermon
Analyze the terminal output to locate any version of Phpservermon/phpservermon in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1241: Use of Predictable Algorithm in Random Number Generator, where the device uses an algorithm that is predictable and generates a pseudo-random number. In Phpservermon/phpservermon, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-4241 Affected Phpservermon/phpservermon Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
phpservermon/phpservermon
|
Packagist |
< 3.6.0
|
3.6.0
|
References
Frequently Asked Questions
What is CVE-2021-4241?
Which Phpservermon/phpservermon versions are affected?
What version fixes CVE-2021-4241?
Is phpservermon/phpservermon affected?
What is the CVSS score of CVE-2021-4241?
What CWE is associated with CVE-2021-4241?
How can I check Packagist dependencies for CVE-2021-4241?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hc4j-7mqg-cxjj",
"modified" : "2023-07-07T21:05:46Z",
"published" : "2022-11-16T12:00:20Z",
"aliases" : [ "CVE-2021-4241" ],
"summary" : "PHPServerMon PRNG has Insufficient Entropy",
"details" : "A vulnerability, which was classified as problematic, was found in phpservermon. Affected is the function `setUserLoggedIn` of the file `src/psm/Service/User.php`. The manipulation leads to use of predictable algorithm in random number generator. The exploit has been disclosed to the public and may be used. The name of the patch is bb10a5f3c68527c58073258cb12446782d223bc3. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-213744.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "phpservermon/phpservermon"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4241"
}, {
"type" : "WEB",
"url" : "https://github.com/phpservermon/phpservermon/commit/bb10a5f3c68527c58073258cb12446782d223bc3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/phpservermon/phpservermon"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/1-phpservermon/phpservermon"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.213744"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1241", "CWE-330", "CWE-331" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-07T21:05:46Z",
"nvd_published_at" : "2022-11-15T23:15:00Z"
}
}