{"id":"CVE-2017-16894","published":"2017-11-20T01:00:00Z","modified":"2024-08-05T20:35:21Z","title":"In Laravel framework through 5.5.21, remote attackers can obtain sensitive information (such as externally usable…","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The flaw lies in the Laravel framework (through 5.5.21) in its writeNewEnvironmentFileWith function within src/Illuminate/Foundation/Console/KeyGenerateCommand.php, which writes the .env file via file_put_contents without restricting that file's permissions. A remote, unauthenticated attacker who can reach the application can request the /.env URI directly and obtain sensitive information such as externally usable passwords, provided the .env file is web-accessible on the deployed server.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:19:09Z"},"cvss":null,"epss":{"score":0.86916,"percentile":0.99744,"date":"2026-10-28","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2025-04-29","exploitedFirstSeen":"2025-04-29","ransomware":false,"evidence":[{"url":"https://www.netscout.com/blog/asert/botnets-and-familiar-foes-drive-ddos-attack-activity","date":"2025-04-29"},{"url":"https://app.crowdsec.net/cti/cve-explorer/CVE-2017-16894","date":"2025-06-07"},{"url":"https://www.netscout.com/blog/asert/botnet-pulse","date":"2025-08-19"}],"evidenceTotal":3,"provenance":"source"},"exploited":true,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[],"references":[{"url":"https://twitter.com/finnwea/status/967709791442341888","tags":["x_refsource_MISC"]},{"url":"http://whiteboyz.xyz/laravel-env-file-vuln.html","tags":["x_refsource_MISC"]},{"url":"http://packetstormsecurity.com/files/153641/PHP-Laravel-Framework-Token-Unserialize-Remote-Command-Execution.html","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2017-8065","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2017-8065","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":47129,"url":"https://www.exploit-db.com/exploits/47129","title":"PHP Laravel Framework 5.5.40 / 5.6.x < 5.6.30 - token Unserialize Remote Command Execution (Metasploit)","type":"remote","platform":"linux","date":"2019-07-16","verified":true,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":1,"earliest":"2019-07-16"},"metasploit":[{"name":"PHP Laravel Framework token Unserialize Remote Command Execution","module":"exploit/unix/http/laravel_token_unserialize_exec","type":"exploit","disclosureDate":"2018-08-07","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/http/laravel_token_unserialize_exec.rb"}],"nuclei":[{"id":"CVE-2017-16894","name":"Laravel <5.5.21 - Information Disclosure","severity":"high","path":"http/cves/2017/CVE-2017-16894.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2017/CVE-2017-16894.yaml"}],"first":{"date":"2018-08-07","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/http/laravel_token_unserialize_exec.rb"},"provenance":"source"},"exploitRefs":["http://packetstormsecurity.com/files/153641/PHP-Laravel-Framework-Token-Unserialize-Remote-Command-Execution.html"],"flow":[],"timeline":[{"date":"2017-11-20","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2017-16894","provenance":"source"},{"date":"2018-08-07","kind":"exploit-public","label":"First public exploit: Metasploit; later: Exploit-DB 2019-07-16","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/http/laravel_token_unserialize_exec.rb","provenance":"source"},{"date":"2025-04-29","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.netscout.com/blog/asert/botnets-and-familiar-foes-drive-ddos-attack-activity","provenance":"source"}],"speed":{"daysToPublicExploit":260,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":59.9,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 548 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.95,"detail":"percentile 0.9974"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 Exploit-DB entry; 1 NVD exploit link; 1 Metasploit module; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}