GHSA-7852-w36x-6mf6: Laravel/framework Laravel Encrypter Component Potential Decryption Vulnerability
MODERATEGHSA-7852-w36x-6mf6 is a MODERATE laravel encrypter component potential decryption vulnerability (CWE-1240: Use of a Cryptographic Primitive with a Risky Implementation) affecting Laravel/framework libraries in the Packagist ecosystem. The issue involves laravel encrypter component potential decryption failure leading to unintended behavior. Remediation is available by upgrading affected packages to version 5.5.40, 5.6.15.
GHSA-7852-w36x-6mf6 at a Glance
How to Fix GHSA-7852-w36x-6mf6
To remediate this vulnerability, upgrade all affected Laravel/framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade laravel/framework to 5.5.40
Upgrade laravel/framework to 5.6.15
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for laravel/framework
How to Check if You Are Affected
To determine whether your application is affected by GHSA-7852-w36x-6mf6, inspect your project dependencies for Laravel/framework:
inspect dependencies for laravel/framework
Analyze the terminal output to locate any version of Laravel/framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.5.40), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1240: Use of a Cryptographic Primitive with a Risky Implementation, where to fulfill the need for a cryptographic primitive, the product implements a cryptographic algorithm using a non-standard, unproven, or disallowed/non-compliant cryptographic implementation. In Laravel/framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-7852-w36x-6mf6 Affected Laravel/framework Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
laravel/framework
|
Packagist |
< 5.5.40
|
5.5.40
|
|
laravel/framework
|
Packagist |
≥ 5.6.0
< 5.6.15
|
5.6.15
|
References
Frequently Asked Questions
What is GHSA-7852-w36x-6mf6?
Which Laravel/framework versions are affected?
What version fixes GHSA-7852-w36x-6mf6?
Is laravel/framework affected?
What CWE is associated with GHSA-7852-w36x-6mf6?
How can I check Packagist dependencies for GHSA-7852-w36x-6mf6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7852-w36x-6mf6",
"modified" : "2024-05-15T22:08:06Z",
"published" : "2024-05-15T22:08:06Z",
"aliases" : [ ],
"summary" : "Laravel Encrypter Component Potential Decryption Failure Leading to Unintended Behavior",
"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:\n\n```\n<?php\n\n$decyptedValue = decrypt($secret);\n\nif ($decryptedValue == '') {\n // Code is run even though decrypted value is false...\n}\n```",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "laravel/framework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.5.40"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "laravel/framework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.6.0"
}, {
"fixed" : "5.6.15"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/laravel/framework/commit/28e53f23a76206fb130e9a54eb95aa3f010e79c9"
}, {
"type" : "WEB",
"url" : "https://github.com/laravel/framework/commit/886d261df0854426b4662b7ed5db6a1c575a4279"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/2018-03-30-1.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/laravel/framework"
}, {
"type" : "WEB",
"url" : "https://medium.com/@taylorotwell/laravel-security-release-5-6-15-and-5-5-40-56f1257933a0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1240" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-15T22:08:06Z",
"nvd_published_at" : null
}
}