What is Laravel?
Laravel is one of the most widely used open-source PHP web application frameworks, powering everything from small business sites to large-scale enterprise applications. It provides built-in mechanisms for encrypting cookies, session data, and other application state using a secret application key (APP_KEY), which is intended to keep that data confidential and tamper-proof from end users' browsers.
Overview
CVE-2018-15133 is a deserialization of untrusted data vulnerability in Laravel's decryption/unserialize handling. If an attacker obtains a copy of an application's APP_KEY — through leaked .env files, source code exposure, misconfigured debug pages, or other means — they can forge encrypted values (such as cookies) that, when decrypted and unserialized by the application, execute a PHP object injection gadget chain, resulting in remote code execution.
Technical Details
The flaw (CWE-502, Deserialization of Untrusted Data) exists because Laravel's cookie/session decryption path unserializes decrypted values without further validating that they are safe, benign data structures. Because PHP's native unserialize() can be abused via "gadget chains" present in the application's own class hierarchy (or third-party libraries it includes) to trigger arbitrary method calls during object construction/destruction, an attacker who can produce a validly-encrypted payload — which requires knowledge of APP_KEY — can achieve code execution purely by having that cookie processed by the application. This is why the vulnerability is scored high (CVSS 8.1) but conditioned on the attacker already possessing the encryption key, a real-world scenario given how often .env files or environment configuration leak via misconfigured servers, source control exposure, or other vulnerabilities.
Discovery
The vulnerability and fix were addressed by the Laravel core team in the framework's own release process; version 5.6.30 was published with the corrected decryption/unserialize handling.
Exploitation Context
CISA's KEV entry confirms real-world exploitation. In practice, attackers typically obtain the APP_KEY through a separate initial vulnerability or misconfiguration (e.g., an exposed .env file, a debug mode information disclosure, or a separate source-code leak) and then use it to weaponize this deserialization bug for full remote code execution — making it a common second-stage exploit in intrusion chains against Laravel-based applications rather than a fully independent, no-prerequisite vulnerability.
Remediation
- Upgrade to Laravel 5.6.30 or later, which fixes the unsafe deserialization behavior.
- Treat any
APP_KEYexposure as a critical incident: rotate the key immediately if there is any suspicion it has leaked (exposed.envfile, source control leak, debug page disclosure, etc.). - Ensure
.envfiles and other files containingAPP_KEYare never web-accessible and are excluded from version control. - Disable debug mode (
APP_DEBUG=false) in production to reduce the risk of key or configuration disclosure. - Monitor for unusual application errors or crashes tied to cookie/session decryption, which can indicate deserialization exploitation attempts.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2018-15133 |
| Vendor / Product | Laravel — Laravel Framework |
| NVD Published | 2018-08-09 |
| NVD Last Modified | 2025-11-07 |
| CVSS 3.1 Score | 8.1 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CWE | CWE-502 find similar ↗ |
| CISA KEV Added | 2024-01-16 |
| CISA KEV Deadline | 2024-02-06 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2018-08-09 | CVE published; Laravel 5.6.30 released addressing the deserialization issue |
| 2024-01-16 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2024-02-06 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2018-15133 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| Laravel 5.6.30 Upgrade Guide | Vendor Advisory |