GHSA-h97c-qp24-439v: Laravel/socialite Insecure State Generation Vulnerability

MODERATE
CWE-331
Published
Advisory Summary

GHSA-h97c-qp24-439v is a MODERATE insecure state generation vulnerability (CWE-331: Insufficient Entropy) affecting Laravel/socialite libraries in the Packagist ecosystem. The issue involves insecure state generation in laravel/socialite. Remediation is available by upgrading affected packages to version 2.0.9.

GHSA-h97c-qp24-439v at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-h97c-qp24-439v
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-331: Insufficient Entropy
Affected Product Laravel/socialite
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix GHSA-h97c-qp24-439v

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

laravel/socialite fixed: 2.0.9
Upgrade laravel/socialite to 2.0.9
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 laravel/socialite

How to Check if You Are Affected

To determine whether your application is affected by GHSA-h97c-qp24-439v, inspect your project dependencies for Laravel/socialite:

inspect dependencies for laravel/socialite

Analyze the terminal output to locate any version of Laravel/socialite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.9), 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 Laravel/socialite, 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

laravel/socialite versions prior to 2.0.9 are found to have an insecure state generation mechanism, potentially exposing the OAuth authentication process to security risks. The issue has been addressed in version 2.0.9 by ensuring that the state is generated using a truly random approach, enhancing the security of the OAuth flow.

GHSA-h97c-qp24-439v Affected Laravel/socialite Versions

1 component(s)
Fixed Versions:
2.0.9
Product / Package Ecosystem Affected Versions Fixed Version
laravel/socialite
Packagist
≥ 1.0.0
< 2.0.9
2.0.9

References

Frequently Asked Questions

What is GHSA-h97c-qp24-439v?
GHSA-h97c-qp24-439v is a security vulnerability in Laravel/socialite involving Insecure State Generation in laravel/socialite under CWE-331: Insufficient Entropy.
Which Laravel/socialite versions are affected?
Affected versions include releases prior to 2.0.9 across affected packages: laravel/socialite.
What version fixes GHSA-h97c-qp24-439v?
Upgrading to 2.0.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/socialite affected?
Yes, laravel/socialite is affected in releases prior to 2.0.9. Upgrade your dependency to 2.0.9 or later.
What CWE is associated with GHSA-h97c-qp24-439v?
GHSA-h97c-qp24-439v 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-h97c-qp24-439v?
Run the dependency tree command: 'inspect dependencies for laravel/socialite'. 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-h97c-qp24-439v",
  "modified" : "2024-05-15T22:27:23Z",
  "published" : "2024-05-15T22:27:23Z",
  "aliases" : [ ],
  "summary" : "Insecure State Generation in laravel/socialite",
  "details" : "laravel/socialite versions prior to 2.0.9 are found to have an insecure state generation mechanism, potentially exposing the OAuth authentication process to security risks. The issue has been addressed in version 2.0.9 by ensuring that the state is generated using a truly random approach, enhancing the security of the OAuth flow.\n\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/socialite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "2.0.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/laravel/socialite/pull/91"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/socialite/commit/2ef13bae1484c44ede68e05486bce76cc0fa8dd8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/socialite/2015-07-23.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/socialite"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-331" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-15T22:27:23Z",
    "nvd_published_at" : null
  }
}