Patchfirst
CVE-2017-16894 Public exploit EPSS 86.9%

In Laravel framework through 5.5.21, remote attackers can obtain sensitive information (such as externally usable…

No fixed version listed yet.Check the vendor advisory. References ↓

Summary

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.

Official description · CVE.org

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.

Breakdown
60.0 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 7 years after disclosure. Public exploit code (Metasploit) appeared 9 months after disclosure.

  1. Disclosedday 0
  2. Public exploit codeMetasploit+9 mo
  3. First seen exploitedVulnCheck KEV evidence+7 yrs
↑ ↓ chooseEnter openEsc close