CVE-2017-16894

HIGH EXPLOITED NUCLEI

Laravel <5.5.21 - Information Disclosure

Title source: nuclei
STIX 2.1

Exploitation Summary

CVE-2017-16894 has been observed exploited in the wild (reported by VulnCheck KEV). EIP tracks 2 public exploits from researchers including Ståle Pettersen, aushack, including a Metasploit module exploits/unix/http/laravel_token_unserialize_exec. A Nuclei detection template is also available.

AI-analyzed exploit summary This Metasploit module exploits a deserialization vulnerability in Laravel Framework versions 5.5.40 and 5.6.x <= 5.6.29 via a crafted X-XSRF-TOKEN header, allowing remote command execution. It includes methods to leak the APP_KEY and generate malicious serialized payloads.

Description

In Laravel framework through 5.5.21, remote attackers can obtain sensitive information (such as externally usable passwords) via a direct request for the /.env URI. NOTE: this CVE is only about Laravel framework's writeNewEnvironmentFileWith function in src/Illuminate/Foundation/Console/KeyGenerateCommand.php, which uses file_put_contents without restricting the .env permissions. The .env filename is not used exclusively by Laravel framework.

Exploits (2)

exploitdb WORKING POC
rubyremotelinux
https://www.exploit-db.com/exploits/47129

This Metasploit module exploits a deserialization vulnerability in Laravel Framework versions 5.5.40 and 5.6.x <= 5.6.29 via a crafted X-XSRF-TOKEN header, allowing remote command execution. It includes methods to leak the APP_KEY and generate malicious serialized payloads.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Laravel Framework 5.5.40, 5.6.x <= 5.6.29
No auth needed
Prerequisites: Knowledge of the Laravel APP_KEY
devstral-2 · analyzed Feb 19, 2026 Full analysis →
metasploit WORKING POC EXCELLENT
by Ståle Pettersen, aushack · rubypocunix
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/http/laravel_token_unserialize_exec.rb

This Metasploit module exploits a deserialization vulnerability in Laravel Framework (CVE-2017-16894) via a crafted X-XSRF-TOKEN header, allowing remote command execution if the APP_KEY is known or leaked. It includes multiple methods to leak the APP_KEY and generate malicious serialized payloads.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Laravel Framework 5.5.40, 5.6.x <= 5.6.29
No auth needed
Prerequisites: Knowledge of the Laravel APP_KEY or ability to leak it via CVE-2017-16894 or framework errors
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Nuclei Templates (1)

Laravel <5.5.21 - Information Disclosure
HIGHVERIFIEDby j4vaovo
Shodan: Laravel-Framework || cpe:"cpe:2.3:a:laravel:laravel" || laravel-framework
FOFA: app="Laravel-Framework" || app="laravel-framework"

References (3)

Core 3
Core References
Third Party Advisory, URL Repurposed x_refsource_misc
http://whiteboyz.xyz/laravel-env-file-vuln.html

Scores

CVSS v3 7.5
EPSS 0.8879
EPSS Percentile 99.5%
Attack Vector NETWORK
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Details

VulnCheck KEV 2025-04-29
CWE
CWE-200
Status published
Products (1)
laravel/laravel < 5.5.21
Published Nov 20, 2017
Tracked Since Feb 18, 2026