# CVE-2018-15133: Laravel Deserialization of Untrusted Data

> Remote code execution via unsafe deserialization of X-XSRF-TOKEN, requiring prior knowledge of the application key.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 16 Jan 2024 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Aug 2018
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-qvqm-h22r-4cp9

## What is CVE-2018-15133?

CVE-2018-15133 is a high-severity unsafe deserialization vulnerability in n/a, published on 9 Aug 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In Laravel Framework through 5.5.40 and 5.6.x through 5.6.29, remote code execution might occur as a result of an unserialize call on a potentially untrusted X-XSRF-TOKEN value. This involves the decrypt method in Illuminate/Encryption/Encrypter.php and PendingBroadcast in gadgetchains/Laravel/RCE/3/chain.php in phpggc. The attacker must know the application key, which normally would never occur, but could happen if the attacker previously had privileged access or successfully accomplished a previous attack.

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2018-15133?

4 open source packages ship an affected version, including laravel/framework. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `laravel/framework` | Packagist | All versions to 5.5.40 | None |
| `laravel/framework` | Packagist | All versions to 5.5.40 | None |
| `laravel/framework` | Packagist | From 5.6.0 | 5.6.30 |
| `laravel/framework` | Packagist | From 5.6.0 | 5.6.30 |

Products: Laravel Laravel.

## How do I fix CVE-2018-15133?

Upgrade laravel/framework to 5.6.30 or later. US federal agencies must fix it by 6 Feb 2024.

## Is CVE-2018-15133 being exploited?

Yes. Attackers have exploited CVE-2018-15133 in the wild since at least 16 Jan 2024.

Public exploit code:

- PoC for CVE-2018-15133 (Laravel unserialize vulnerability) (github_poc): https://github.com/kozmic/laravel-poc-CVE-2018-15133
- Exploit for Laravel Remote Code Execution with API_KEY (CVE-2018-15133) (github_poc): https://github.com/aljavier/exploit_laravel_cve-2018-15133
- Laravel RCE exploit. CVE-2018-15133 (github_poc): https://github.com/pwnedshell/Larascript
- Laravel-PHP-Unit-RCE (CVE-2018-15133) Auto Exploiter and Shell Uploader (github_poc): https://github.com/Prabesh01/Laravel-PHP-Unit-RCE-Auto-shell-uploader
- https://github.com/AzhariKun/CVE-2018-15133 (github_poc): https://github.com/AzhariKun/CVE-2018-15133
- https://github.com/yeahhbean/Laravel-CVE-2018-15133 (github_poc): https://github.com/yeahhbean/Laravel-CVE-2018-15133

## Other vulnerabilities in n/a

- [CVE-2021-28254](https://insights.sbomify.com/CVE-2021-28254/): Deserialization in n/a (critical 9.8)
- [CVE-2020-24940](https://insights.sbomify.com/CVE-2020-24940/): Guard bypass in Eloquent models affecting Laravel illuminate database component (high 7.5)
- [CVE-2020-24941](https://insights.sbomify.com/CVE-2020-24941/): Improper Input Validation in Laravel (high 7.5)
- [CVE-2017-16894](https://insights.sbomify.com/CVE-2017-16894/): Information disclosure in n/a (high 7.5)
- [CVE-2021-21263](https://insights.sbomify.com/CVE-2021-21263/): Query Binding Exploitation in Laravel (high 7.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-15133 and fix it if it is affected.

What it is: CVE-2018-15133 is a high-severity unsafe deserialization vulnerability in n/a, published on 9 Aug 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2018-15133 in the wild since at least 16 Jan 2024.

Affected packages and fixed versions:
- laravel/framework (Packagist): affected all versions up to 5.5.40; no fix listed
- laravel/framework (Packagist): affected all versions up to 5.5.40; no fix listed
- laravel/framework (Packagist): affected from 5.6.0; fixed in 5.6.30
- laravel/framework (Packagist): affected from 5.6.0; fixed in 5.6.30

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-15133/ (Markdown: https://insights.sbomify.com/CVE-2018-15133/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-15133
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-15133
- OSV: https://osv.dev/vulnerability/CVE-2018-15133

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-15133/
Summaries are generated and may contain mistakes; the official description above is the record.
