CVE-2017-16894

CVE-2017-16894 is a high-severity vulnerability in Laravel with a CVSS 3.x base score of 7.5. Its EPSS exploit-prediction score of 87% places it in the 100th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-200.

Key facts

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.

Frequently asked questions

What is CVE-2017-16894?
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.
How severe is CVE-2017-16894?
CVE-2017-16894 has a CVSS 3.x base score of 7.5, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity none, and availability none.
Is CVE-2017-16894 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 87% (100th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2017-16894?
CVE-2017-16894 affects Laravel. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2017-16894?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
When was CVE-2017-16894 published?
CVE-2017-16894 was published on 2017-11-20 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Laravel

All CVEs affecting Laravel →

Other CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) vulnerabilities

Browse all CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) vulnerabilities →