{"schemaVersion":3,"id":"CVE-2017-16894","aliases":[],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2017-11-20T01:00:00.000Z","modified":"2024-08-05T20:35:21.344Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.0","versionLabel":"v3.0","source":"NVD","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.0","versionLabel":"v3.0","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":5,"severity":"medium","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.86916,"percentile":0.99747,"severity":"critical","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.86916},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.83416,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.86916,"percentile":0.99747}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.83416,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.86916,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.86916,"percentile":0.99747}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"47129","name":"PHP Laravel Framework 5.5.40 / 5.6.x < 5.6.30 - token Unserialize Remote Command Execution (Metasploit)","source":"exploit-database","url":"https://www.exploit-db.com/exploits/47129","maturity":"weaponized","reliabilityScore":0.8,"verified":true,"type":"remote","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":true,"type":"remote","platform":"linux","file":"exploits/linux/remote/47129.rb","codes":["CVE-2018-15133","CVE-2017-16894"]},"metasploit":null},{"id":"MSF_EXPLOIT_UNIX_HTTP_LARAVEL_TOKEN_UNSERIALIZE_EXEC","name":"PHP Laravel Framework token Unserialize Remote Command Execution","source":"metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploit/unix/http/laravel_token_unserialize_exec.rb","maturity":"weaponized","reliabilityScore":1,"verified":true,"type":"remote","platforms":[],"requiresAuth":false,"exploitdb":null,"metasploit":{"fullname":"exploit/unix/http/laravel_token_unserialize_exec","rank":"600","rankName":"excellent","postAuth":false,"check":true,"stability":["unknown-stability"],"sideEffects":["unknown-side-effects"],"reliability":["unknown-reliability"]}}],"exploitCount":2,"weaknesses":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor","description":"The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/200.html"}],"affected":[{"vendor":"laravel","product":"laravel","name":"laravel","label":"laravel","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 5.5.21","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 5.5.21","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"laravel","label":"Laravel","category":"framework"}},"hubHref":"/vendor/laravel/laravel"}],"affectedCount":1,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://twitter.com/finnwea/status/967709791442341888","label":"twitter.com/finnwea/status/967709791442341888","hostname":"twitter.com","tags":["X Refsource MISC"]},{"url":"http://whiteboyz.xyz/laravel-env-file-vuln.html","label":"whiteboyz.xyz/laravel-env-file-vuln.html","hostname":"whiteboyz.xyz","tags":["X Refsource MISC","Third Party Advisory","URL Repurposed"]},{"url":"http://packetstormsecurity.com/files/153641/PHP-Laravel-Framework-Token-Unserialize-Remote-Command-Execution.html","label":"packetstormsecurity.com/files/…","hostname":"packetstormsecurity.com","tags":["X Refsource MISC"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2017-11-20T01:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-05T20:35:21.344Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":57,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T11:49:06.496Z","stale":false,"partial":false}}