Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. laravel/framework
  4. ›
  5. GHSA-7852-w36x-6mf6

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

May 15, 2024

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

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/2018-03-30-1.yaml
  • github.com/advisories/GHSA-7852-w36x-6mf6
  • github.com/laravel/framework
  • github.com/laravel/framework/commit/28e53f23a76206fb130e9a54eb95aa3f010e79c9
  • github.com/laravel/framework/commit/886d261df0854426b4662b7ed5db6a1c575a4279
  • medium.com/@taylorotwell/laravel-security-release-5-6-15-and-5-5-40-56f1257933a0

Code Behaviors & Features

Detect and mitigate GHSA-7852-w36x-6mf6 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.5.40, all versions starting from 5.6.0 before 5.6.15

Fixed versions

  • 5.5.40
  • 5.6.15

Solution

Upgrade to versions 5.5.40, 5.6.15 or above.

Weakness

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

Source file

packagist/laravel/framework/GHSA-7852-w36x-6mf6.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:28 +0000.