GHSA-qm5c-m76r-2hfr: Laravel/framework Remote Code Execution Vulnerability

CRITICAL
CVSS 9.9
Published
Advisory Summary

GHSA-qm5c-m76r-2hfr is a CRITICAL (CVSS 9.9) remote code execution vulnerability (General Security Weakness) affecting Laravel/framework libraries in the Packagist ecosystem. The issue involves laravel rce vulnerability in "cookie" session driver. Remediation is available by upgrading affected packages to version 6.18.31, 7.22.4.

GHSA-qm5c-m76r-2hfr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-qm5c-m76r-2hfr
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification General Security Weakness
Affected Product Laravel/framework
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).

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

How to Fix GHSA-qm5c-m76r-2hfr

To remediate this vulnerability, upgrade all affected Laravel/framework 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/framework fixed: 6.18.31
Upgrade laravel/framework to 6.18.31
laravel/framework fixed: 7.22.4
Upgrade laravel/framework to 7.22.4
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/framework

How to Check if You Are Affected

To determine whether your application is affected by GHSA-qm5c-m76r-2hfr, inspect your project dependencies for Laravel/framework:

inspect dependencies for laravel/framework

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

Applications using the "cookie" session driver that were also exposing an encryption oracle via their application were vulnerable to remote code execution. An encryption oracle is a mechanism where arbitrary user input is encrypted and the encrypted string is later displayed or exposed to the user. This combination of scenarios lets the user generate valid Laravel signed encryption strings for any plain-text string, thus allowing them to craft Laravel session payloads when an application is using the "cookie" driver.

GHSA-qm5c-m76r-2hfr Affected Laravel/framework Versions

2 component(s)
Fixed Versions:
6.18.317.22.4
Product / Package Ecosystem Affected Versions Fixed Version
laravel/framework
Packagist
≥ 4.1.0
< 6.18.31
6.18.31
laravel/framework
Packagist
≥ 7.0.0
< 7.22.4
7.22.4

References

Frequently Asked Questions

What is GHSA-qm5c-m76r-2hfr?
GHSA-qm5c-m76r-2hfr is a security vulnerability in Laravel/framework involving Laravel RCE vulnerability in "cookie" session driver under General Security Weakness.
Which Laravel/framework versions are affected?
Affected versions include releases prior to 6.18.31, 7.22.4 across affected packages: laravel/framework.
What version fixes GHSA-qm5c-m76r-2hfr?
Upgrading to 6.18.31, 7.22.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/framework affected?
Yes, laravel/framework is affected in releases prior to 6.18.31, 7.22.4. Upgrade your dependency to 6.18.31, 7.22.4 or later.
What is the CVSS score of GHSA-qm5c-m76r-2hfr?
GHSA-qm5c-m76r-2hfr has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with GHSA-qm5c-m76r-2hfr?
GHSA-qm5c-m76r-2hfr is classified under General Security Weakness.
How can I check Packagist dependencies for GHSA-qm5c-m76r-2hfr?
Run the dependency tree command: 'inspect dependencies for laravel/framework'. 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-qm5c-m76r-2hfr",
  "modified" : "2024-05-15T22:16:52Z",
  "published" : "2024-05-15T22:16:52Z",
  "aliases" : [ ],
  "summary" : "Laravel RCE vulnerability in \"cookie\" session driver",
  "details" : "Applications using the \"cookie\" session driver that were also exposing an encryption oracle via their application were vulnerable to remote code execution. An encryption oracle is a mechanism where arbitrary user input is encrypted and the encrypted string is later displayed or exposed to the user. This combination of scenarios lets the user generate valid Laravel signed encryption strings for any plain-text string, thus allowing them to craft Laravel session payloads when an application is using the \"cookie\" driver.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "6.18.31"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.22.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://blog.laravel.com/laravel-cookie-security-releases"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/2020-07-27-1.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/framework"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-15T22:16:52Z",
    "nvd_published_at" : null
  }
}