Critical

Laravel RCE vulnerability in "cookie" session driver

  • Disclosed: 15.05.2024
  • Updated: 11.10.2026 10:22

Application's using the "cookie" session driver were the primary applications affected by this vulnerability. Since we have not yet released a security release for the Laravel 5.5 version of the framework, we recommend that all applications running Laravel 5.5 and earlier do not use the "cookie" session driver in their production deployments.

Regarding the vulnerability, 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.

This fix prefixes cookie values with an HMAC hash of the cookie's name before encryption and then verifies a matching hash on decryption, making it impossible to craft a valid cookie payload even if an encryption oracle is exposed via the application.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package illuminate/cookie >= 4.1.0, < 6.18.31, >= 7.0.0, < 7.22.4 6.18.31, 7.22.4

References

CVSS score -
Weakness (CWE)
CWE-94
Platform
Composer
Package
illuminate/cookie
Disclosed
15.05.2024
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-2ffv-r4r9-r8xr - CC BY 4.0

Vulnerability history: illuminate/cookie

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
2
First → latest
05.2024 05.2024
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 1

Disclosures per year

  1. 2024: 2
  2. 2025: 0
  3. 2026: 0
  1. High ghsa-2867-6rrm-38gr >= 5.5.0, < 5.6.30 5.6.30
  2. Laravel RCE vulnerability in "cookie" session driver this entry
    Critical ghsa-2ffv-r4r9-r8xr >= 4.1.0, < 6.18.31, >= 7.0.0, < 7.22.4 6.18.31, 7.22.4

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.