GHSA-3fmq-x9q6-wm39: Paragonie/random compat Random_compat Uses Insecure CSPRNG Vulnerability

LOW
CWE-331
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-3fmq-x9q6-wm39
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-331: Insufficient Entropy
Affected Product Paragonie/random compat
Package Ecosystem Packagist
Published Date
Last Updated

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.

paragonie/random_compat fixed: 2.0
Upgrade paragonie/random_compat to 2.0
Verify Direct and Transitive Dependencies

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

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.

GHSA-3fmq-x9q6-wm39 Affected Paragonie/random compat Versions

1 component(s)
Fixed Versions:
2.0
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?
GHSA-3fmq-x9q6-wm39 is a security vulnerability in Paragonie/random compat involving random_compat Uses insecure CSPRNG under CWE-331: Insufficient Entropy.
Which Paragonie/random compat versions are affected?
Affected versions include releases prior to 2.0 across affected packages: paragonie/random_compat.
What version fixes GHSA-3fmq-x9q6-wm39?
Upgrading to 2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is paragonie/random_compat affected?
Yes, paragonie/random_compat is affected in releases prior to 2.0. Upgrade your dependency to 2.0 or later.
What CWE is associated with GHSA-3fmq-x9q6-wm39?
GHSA-3fmq-x9q6-wm39 is classified under CWE-331: Insufficient Entropy (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.).
How can I check Packagist dependencies for GHSA-3fmq-x9q6-wm39?
Run the dependency tree command: 'inspect dependencies for paragonie/random_compat'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}