GHSA-qm5c-m76r-2hfr Laravel RCE vulnerability in "cookie" session driver

Not scored Published

Attackers can achieve remote code execution by exploiting an encryption oracle to craft malicious session payloads in applications using the cookie session driver.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-qm5c-m76r-2hfr?

GHSA-qm5c-m76r-2hfr is an unsafe deserialization vulnerability in laravel/framework, published on 15 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Which versions are affected by GHSA-qm5c-m76r-2hfr?

4 open source packages ship an affected version, including laravel/framework.

PackageAffectedFixed in
laravel/framework PackagistFrom 4.1.06.18.31
laravel/framework PackagistFrom 4.1.06.18.31
laravel/framework PackagistFrom 7.0.07.22.4
laravel/framework PackagistFrom 7.0.07.22.4

How do I fix GHSA-qm5c-m76r-2hfr?

Upgrade laravel/framework to a fixed version for your release line: 6.18.31 or 7.22.4.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is GHSA-qm5c-m76r-2hfr being exploited?

There is no known exploitation of GHSA-qm5c-m76r-2hfr in the wild and no public exploit code.

Sources

Is GHSA-qm5c-m76r-2hfr in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free