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
- Severity: High (CVSS 3.x base score 7.5)
- CVSS v2: 5.0
- EPSS exploit prediction: 87% (100th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-200
- Affected product: Laravel
- Published:
- Last modified:
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
- http://packetstormsecurity.com/files/153641/PHP-Laravel-Framework-Token-Unserialize-Remote-Command-Execution.html
- http://whiteboyz.xyz/laravel-env-file-vuln.html
- https://twitter.com/finnwea/status/967709791442341888
Affected products (1)
- cpe:2.3:a:laravel:laravel:*:*:*:*:*:*:*:*
More vulnerabilities in Laravel
- CVE-2021-28254 — Critical (CVSS 9.8): A deserialization vulnerability in the destruct() function of Laravel v8.5.9 allows attackers to execute arbitrary…
- CVE-2018-15133 — High (CVSS 8.1): In Laravel Framework through 5.5.40 and 5.6.x through 5.6.29, remote code execution might occur as a result of an…
- CVE-2020-24941 — High (CVSS 7.5): An issue was discovered in Laravel before 6.18.35 and 7.x before 7.24.0. The $guarded property is mishandled in some…
- CVE-2020-24940 — High (CVSS 7.5): An issue was discovered in Laravel before 6.18.34 and 7.x before 7.23.2. Unvalidated values are saved to the database…
- CVE-2021-21263 — High (CVSS 7.2): Laravel is a web application framework. Versions of Laravel before 6.20.11, 7.30.2 and 8.22.1 contain a query binding…
- CVE-2017-9303 — Medium (CVSS 6.1): Laravel 5.4.x before 5.4.22 does not properly constrain the host portion of a password-reset URL, which makes it easier…
Other CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) vulnerabilities
- CVE-2026-27604 — Critical (CVSS 10.0): FOSSBilling is a free, open-source billing and client management system. Starting in version 0.5.4 and prior to version…
- CVE-2026-40965 — Critical (CVSS 10.0): Cloud Foundry UAA versions v76.12.0 through v78.12.0 are vulnerable to a private key exposure. The server contains a…
- CVE-2026-42826 — Critical (CVSS 10.0): Exposure of sensitive information to an unauthorized actor in Azure DevOps allows an unauthorized attacker to disclose…
- CVE-2025-29270 — Critical (CVSS 10.0): Incorrect access control in the realtime.cgi endpoint of Deep Sea Electronics devices DSE855 v1.1.0 to v1.1.26 allows…
- CVE-2025-61481 — Critical (CVSS 10.0): An issue in MikroTik RouterOS v.7.14.2 and SwOS v.2.18 exposes the WebFig management interface over cleartext HTTP by…
- CVE-2025-53624 — Critical (CVSS 10.0): The Docusaurus gists plugin adds a page to your Docusaurus instance, displaying all public gists of a GitHub user.…
Browse all CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) vulnerabilities →