Vulnerability Details : CVE-2017-16894
Public exploit exists!
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.
Vulnerability category: Information leak
Products affected by CVE-2017-16894
- cpe:2.3:a:laravel:laravel:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2017-16894
86.10%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 99 %
Percentile, the proportion of vulnerabilities that are scored at or less
Metasploit modules for CVE-2017-16894
-
PHP Laravel Framework token Unserialize Remote Command Execution
Disclosure Date: 2018-08-07First seen: 2020-04-26exploit/unix/http/laravel_token_unserialize_execThis module exploits a vulnerability in the PHP Laravel Framework for versions 5.5.40, 5.6.x <= 5.6.29. Remote Command Execution is possible via a correctly formatted HTTP X-XSRF-TOKEN header, due to an insecure unserialize call of the decrypt method in Illuminate/Encryption
CVSS scores for CVE-2017-16894
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
5.0
|
MEDIUM | AV:N/AC:L/Au:N/C:P/I:N/A:N |
10.0
|
2.9
|
NIST | |
7.5
|
HIGH | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
3.9
|
3.6
|
NIST |
CWE ids for CVE-2017-16894
-
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.Assigned by: nvd@nist.gov (Primary)
References for CVE-2017-16894
-
https://twitter.com/finnwea/status/967709791442341888
Tijme Gommers on Twitter: "Many Laravel applications expose their database, AWS & mail credentials due to misconfigurations 😅 (credits to someone on a private Slack channel). https://t.co/1u0NCjfIrg…
-
http://packetstormsecurity.com/files/153641/PHP-Laravel-Framework-Token-Unserialize-Remote-Command-Execution.html
PHP Laravel Framework Token Unserialize Remote Command Execution ≈ Packet Storm
-
http://whiteboyz.xyz/laravel-env-file-vuln.html
White Boyz -Third Party Advisory
Jump to