GHSA-3fmq-x9q6-wm39: Paragonie/random compat Random_compat Uses Insecure CSPRNG Vulnerability
LOWGHSA-3fmq-x9q6-wm39 is a LOW random_compat uses insecure csprng vulnerability (CWE-331: Insufficient Entropy) affecting Paragonie/random compat libraries in the Packagist ecosystem. The issue involves random_compat uses insecure csprng. Remediation is available by upgrading affected packages to version 2.0.
GHSA-3fmq-x9q6-wm39 at a Glance
How to Fix GHSA-3fmq-x9q6-wm39
To remediate this vulnerability, upgrade all affected Paragonie/random compat 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 paragonie/random_compat to 2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for paragonie/random_compat
How to Check if You Are Affected
To determine whether your application is affected by GHSA-3fmq-x9q6-wm39, inspect your project dependencies for Paragonie/random compat:
inspect dependencies for paragonie/random_compat
Analyze the terminal output to locate any version of Paragonie/random compat in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.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-331: Insufficient Entropy, where the product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others. In Paragonie/random compat, 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
GHSA-3fmq-x9q6-wm39 Affected Paragonie/random compat Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
paragonie/random_compat
|
Packagist |
< 2.0
|
2.0
|
References
Frequently Asked Questions
What is GHSA-3fmq-x9q6-wm39?
Which Paragonie/random compat versions are affected?
What version fixes GHSA-3fmq-x9q6-wm39?
Is paragonie/random_compat affected?
What CWE is associated with GHSA-3fmq-x9q6-wm39?
How can I check Packagist dependencies for GHSA-3fmq-x9q6-wm39?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3fmq-x9q6-wm39",
"modified" : "2024-05-17T23:27:19Z",
"published" : "2024-05-17T23:27:19Z",
"aliases" : [ ],
"summary" : "random_compat Uses insecure CSPRNG",
"details" : "random_compat versions prior to 2.0 are affected by a security vulnerability related to the insecure usage of Cryptographically Secure Pseudo-Random Number Generators (CSPRNG). The affected versions use openssl_random_pseudo_bytes(), which may result in insufficient entropy and compromise the security of generated random numbers.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "paragonie/random_compat"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/paragonie/random_compat/issues/96"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/paragonie/random_compat/2016-03-16.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/paragonie/random_compat"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-331" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-17T23:27:19Z",
"nvd_published_at" : null
}
}