GHSA-q8fc-v85f-78pw: Stormpath/sdk Stormpath/sdk Uses Insecure Random Number Vulnerability

MODERATE
CVSS 5.3
CWE-338
Published
Advisory Summary

GHSA-q8fc-v85f-78pw is a MODERATE (CVSS 5.3) stormpath/sdk uses insecure random number vulnerability (CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)) affecting Stormpath/sdk libraries in the Packagist ecosystem. The issue involves stormpath/sdk uses insecure random number generator. Remediation is available in the latest vendor maintenance releases.

GHSA-q8fc-v85f-78pw at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-q8fc-v85f-78pw
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Affected Product Stormpath/sdk
Package Ecosystem Packagist
Published Date
Last Updated

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:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix GHSA-q8fc-v85f-78pw

To remediate this vulnerability, upgrade all affected Stormpath/sdk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

stormpath/sdk fixed: Latest secure release
Upgrade stormpath/sdk to Latest secure release
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 stormpath/sdk

How to Check if You Are Affected

To determine whether your application is affected by GHSA-q8fc-v85f-78pw, inspect your project dependencies for Stormpath/sdk:

inspect dependencies for stormpath/sdk

Analyze the terminal output to locate any version of Stormpath/sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG), where the product uses a pseudo-random number generator (prng) in a security context, but the prng's algorithm is not cryptographically strong. In Stormpath/sdk, 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

The vulnerability pertains to the usage of an insecure random number generator (RNG) in the "stormpath-sdk-php" library. Specifically, the issue is present in the generation of UUID (Universally Unique Identifier) version 4 within the codebase.

GHSA-q8fc-v85f-78pw Affected Stormpath/sdk Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
stormpath/sdk
Packagist
≤ 1.19.0

References

Frequently Asked Questions

What is GHSA-q8fc-v85f-78pw?
GHSA-q8fc-v85f-78pw is a security vulnerability in Stormpath/sdk involving stormpath/sdk uses Insecure Random Number Generator under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG).
Which Stormpath/sdk versions are affected?
Affected versions include releases prior to current release patches across affected packages: stormpath/sdk.
What version fixes GHSA-q8fc-v85f-78pw?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is stormpath/sdk affected?
Yes, stormpath/sdk is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-q8fc-v85f-78pw?
GHSA-q8fc-v85f-78pw has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with GHSA-q8fc-v85f-78pw?
GHSA-q8fc-v85f-78pw is classified under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) (The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.).
How can I check Packagist dependencies for GHSA-q8fc-v85f-78pw?
Run the dependency tree command: 'inspect dependencies for stormpath/sdk'. 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-q8fc-v85f-78pw",
  "modified" : "2024-05-29T13:09:29Z",
  "published" : "2024-05-29T13:09:29Z",
  "aliases" : [ ],
  "summary" : "stormpath/sdk uses Insecure Random Number Generator",
  "details" : "The vulnerability pertains to the usage of an insecure random number generator (RNG) in the \"stormpath-sdk-php\" library. Specifically, the issue is present in the generation of UUID (Universally Unique Identifier) version 4 within the codebase.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "stormpath/sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.19.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/stormpath/stormpath-sdk-php/issues/132"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/stormpath/sdk/2017-11-20.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/stormpath/stormpath-sdk-php"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/stormpath/stormpath-sdk-php/blob/15aee3007b8aa41c20cdf28fd650b8a2368a7fa9/src/Util/UUID.php#L167-L181"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/stormpath/stormpath-sdk-php/blob/62698ea98ef89217f932e28cf3e511d39af3b4cf/src/Authc/Api/ApiKeyEncryptionOptions.php#L48-L50"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-338" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-29T13:09:29Z",
    "nvd_published_at" : null
  }
}