MediumGHSA-7852-w36x-6mf6

Laravel Encrypter Component Potential Decryption Failure Leading to Unintended Behavior

Published 15 May 2024 · Updated 29 Nov 2024

Affected packages

Affected
<5.5.40
Fixed in
5.5.40
Update to the fixed version for your release line, for example:composer require laravel/framework:^5.5.40
Affected
>=5.6.0 <5.6.15
Fixed in
5.6.15
Update to the fixed version for your release line, for example:composer require laravel/framework:^5.6.15

Details

The Laravel Encrypter component is susceptible to a vulnerability that may result in decryption failure, leading to an unexpected return of false. Exploiting this issue requires the attacker to manipulate the encrypted payload before decryption. When combined with weak type comparisons in the application's code, such as the example below:

<?php

$decyptedValue = decrypt($secret);

if ($decryptedValue == '') {
    // Code is run even though decrypted value is false...
}

Is GHSA-7852-w36x-6mf6 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected laravel/framework, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.