CVE-2017-16894
In Laravel framework through 5.5.21, remote attackers can obtain sensitive information (such as externally usable passwords) via a direct…
- 7.5HighCVSS base score
- 86.9%Exploitation in 30 daysEPSS · top 0.3% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- 3Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Metasploit module, a Nuclei template and an Exploit-DB entry for it.
Show the exploits3
Metasploit modules1 module
- PHP Laravel Framework token Unserialize Remote Command Execution (Metasploit module) (opens in a new tab)
exploit/unix/http/laravel_token_unserialize_execRank excellentdisclosed 7 Aug 2018
Nuclei templates1 template
- Laravel <5.5.21 - Information Disclosure (Nuclei template) (opens in a new tab)
http/cves/2017/CVE-2017-16894.yamlSeverity high
Exploit-DB1 entry
- PHP Laravel Framework 5.5.40 / 5.6.x < 5.6.30 - token Unserialize Remote Command Execution (Metasploit) (Exploit-DB entry) (opens in a new tab)
EDB-ID 47129remote, linuxpublished 16 Jul 2019Verified
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By mitre
- 1 day later
· 1 day later
Published
- 7 years later
· 7 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.0 | High7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
- EPSS (exploitation in 30 days)
- 86.9% · top 0.3% of all CVEs (10 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.
Affected products
n/a
- affected n/a
References
3
- https://twitter.com/finnwea/status/967709791442341888 (opens in a new tab)x_refsource_MISCx_transferred
- http://whiteboyz.xyz/laravel-env-file-vuln.html (opens in a new tab)x_refsource_MISCx_transferred
- http://packetstormsecurity.com/files/153641/PHP-Laravel-Framework-Token-Unserialize-Remote-Command-Execution.html (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2017-8065 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2017-16894)Record last updated .