GitHub Advisoryadvisory · Packagist

GHSA-7852-w36x-6mf6 Laravel Encrypter Component Potential Decryption Failure Leading to Unintended Behavior

MEDIUM Published 2024-05-15 Modified 2024-05-15 Official page ↗
Ecosystem
Packagist
Packages
laravel/framework
Severity
Moderate
Weaknesses
CWE-1240
Reviewed
2024-05-15

Affected packages

• Packagist laravel/framework: < 5.5.40 → fixed in 5.5.40 • Packagist laravel/framework: >= 5.6.0, < 5.6.15 → fixed in 5.6.15

Description

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... } ```

Related

Weakness · CWE (1)

  • CWE-1240 Use of a Cryptographic Primitive with a Risky Implementation weakness

References