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 ↓
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.
- Exploited
- Yes, in VulnCheck KEV
- Reports
- 0
- Tactics
- 0/15
Exploitation timelineDated milestones for a CVE: when it was disclosed, when exploit code became public, when exploitation was confirmed, and when threat reports named it.
First seen exploited 7 years after disclosure. Public exploit code (Metasploit) appeared 9 months after disclosure.
- Disclosedday 0
- Public exploit codeMetasploit+9 mo
- First seen exploitedVulnCheck KEV evidence+7 yrs