Shodan dataset on XSRF-TOKEN cookies from the 30th of May 2025 | Image: Synacktiv
A recent technical deep-dive by Synacktiv has exposed a serious yet often overlooked risk in Laravel—the popular PHP web framework—highlighting how a leaked or guessable APP_KEY can turn into a full-blown application compromise vector. Despite Laravel’s popularity and over a million publicly exposed instances online, Synacktiv warns that “some designs in place on Laravel’s internal development components pose risks“—risks that can lead directly to Remote Code Execution (RCE).
At the core of Laravel’s encryption lies the encrypt() and decrypt() functions, which use AES-256-CBC encryption tied to the project’s APP_KEY. As Synacktiv explains:
“Data encrypted by Laravel is manipulated as a base64-encoded JSON containing a value encrypted in AES CBC mode using the APP_KEY.”
This might sound secure—until it’s not. If the APP_KEY is leaked or predictable (which is alarmingly common), attackers can decrypt data, re-encrypt malicious payloads, and launch deserialization attacks that compromise entire servers.
Synacktiv demonstrated how vulnerable Laravel applications can be exploited through deserialization chains using tools like phpggc and their custom-built laravel-crypto-killer.
In 2024 alone, they discovered multiple CVEs tied to APP_KEY misuse:
- CVE-2024-55555 in Invoice Ninja: Allowed attackers to control a string passed to a decrypt() call through a public route. Using the default APP_KEY, they demonstrated RCE with uid=1500(invoiceninja).
- CVE-2024-48987 in Snipe-IT: By manipulating the XSRF-TOKEN cookie with a serialized payload, an unauthenticated attacker could trigger unserialize() via decrypt() and execute system commands.
- CVE-2024-55556 in Crater: The default SESSION_DRIVER=cookie setting allowed attackers to retrieve and manipulate session cookies, again leading to deserialization and RCE.
What makes this threat even more potent is key reuse. Laravel does not force regeneration of APP_KEYs for deployments. Synacktiv found that:
“Most of the APP_KEYs detailed on this top 10 are default ones from big projects… If you set it on a project you are selling to customers, they WILL keep it as long as everything works.”
A scan across the internet revealed over 1,000 Laravel applications using default or easily guessable APP_KEYs. Many are traceable to products sold on CodeCanyon or GitHub-shared forks.
To quantify the threat, Synacktiv leveraged Shodan to gather over 600,000 XSRF-TOKEN cookies and launched a massive brute-force campaign with their optimized tool nounours—cutting brute-force time from two weeks to under two minutes.
The results were:
- 3.56% of Laravel applications were successfully cracked.
- Over 1,000 servers remain vulnerable to CVE-2018-15133, a known Laravel RCE flaw from 2018.
- Invoice Ninja, Snipe-IT, and Crater remain top offenders with their default APP_KEYs still in circulation.
Laravel developers are urged to take immediate action:
- Always generate a unique APP_KEY using php artisan key:generate.
- Avoid committing .env files or APP_KEY values to Git.
- Rotate secrets and audit existing installations for hardcoded or reused keys.
- Upgrade Laravel and dependent packages to versions that enforce safer practices around deserialization and session handling.
Synacktiv warned:
“All the previous vulnerabilities could be exploited pre-authentication as long as the default APP_KEY of the project was not changed by the end users themselves.”
Related Posts:
- Impossible Recovery? Beating Akira Ransomware with GPUs
- ScriptCase Flaws (CVE-2025-47227/47228): Pre-Auth RCE & Admin Takeover Risk for Web Servers, PoC Published
- CVE-2024-55661: RCE Vulnerability Discovered in Laravel Pulse Monitoring Tool
- Security firm releases free Diavol ransomware decryptor tool
Support Our Threat Intelligence
If you find our CVE report and cybersecurity news helpful, consider supporting our work.