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.
CVSS
- Version: 3.0
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Base score: 7.5
Exploitation probability (EPSS)
- Probability of exploitation in the next 30 days: 87%
- Percentile among all scored CVEs: 100
- Score date: 10/14/2026
EPSS (Exploit Prediction Scoring System, FIRST) estimates how likely a vulnerability is to be exploited in the wild within 30 days. It complements CVSS (impact) and CISA KEV (confirmed exploitation).
💥 Public exploits
Exploit code or detection templates are publicly available. This is not the same as confirmed active exploitation (KEV), but it raises the risk: patch with priority.
- Metasploit module (reliable, widely available exploit) · PHP Laravel Framework token Unserialize Remote Command Execution
- Published on Exploit-DB · PHP Laravel Framework 5.5.40 / 5.6.x < 5.6.30 - token Unserialize Remote Command Execution (Metasploit) (7/16/2019)
- Nuclei template (automated mass detection) · Laravel <5.5.21 - Information Disclosure
Affected technologies (1)
CWEs
- CWE-200
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
- 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
Raw JSON (NVD)
Show
{
"id": "CVE-2017-16894",
"cveTags": [],
"metrics": {
"cvssMetricV2": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"version": "2.0",
"baseScore": 5,
"accessVector": "NETWORK",
"vectorString": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
"authentication": "NONE",
"integrityImpact": "NONE",
"accessComplexity": "LOW",
"availabilityImpact": "NONE",
"confidentialityImpact": "PARTIAL"
},
"acInsufInfo": false,
"impactScore": 2.9,
"baseSeverity": "MEDIUM",
"obtainAllPrivilege": false,
"exploitabilityScore": 10,
"obtainUserPrivilege": false,
"obtainOtherPrivilege": false,
"userInteractionRequired": false
}
],
"cvssMetricV30": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.0",
"baseScore": 7.5,
"attackVector": "NETWORK",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"integrityImpact": "NONE",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 3.6,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "cve@mitre.org",
"affectedData": [
{
"vendor": "n/a",
"product": "n/a",
"versions": [
{
"status": "affected",
"version": "n/a"
}
]
}
]
}
],
"published": "2017-11-20T01:29:00.227",
"references": [
{
"url": "http://packetstormsecurity.com/files/153641/PHP-Laravel-Framework-Token-Unserialize-Remote-Command-Execution.html",
"source": "cve@mitre.org"
},
{
"url": "http://whiteboyz.xyz/laravel-env-file-vuln.html",
"tags": [
"Third Party Advisory",
"URL Repurposed"
],
"source": "cve@mitre.org"
},
{
"url": "https://twitter.com/finnwea/status/967709791442341888",
"source": "cve@mitre.org"
},
{
"url": "http://packetstormsecurity.com/files/153641/PHP-Laravel-Framework-Token-Unserialize-Remote-Command-Execution.html",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://whiteboyz.xyz/laravel-env-file-vuln.html",
"tags": [
"Third Party Advisory",
"URL Repurposed"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://twitter.com/finnwea/status/967709791442341888",
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-200"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "En el framework Laravel hasta la versión 5.5.21, los atacantes remotos pueden obtener información sensible (como contraseñas de uso externo) mediante una petición directa para la URI /.env. NOTA: este CVE solo trata de la función writeNewEnvironmentFileWith del framework Laravel en src/Illuminate/Foundation/Console/KeyGenerateCommand.php que utiliza file_put_contents sin restringir los permisos .env. El nombre de archivo .env no es de uso exclusivo del framework Laravel."
}
],
"lastModified": "2026-06-17T01:10:06.353",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:laravel:laravel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "A8C7A7F1-FA13-4CC6-A7C0-8D40775CB404",
"versionEndIncluding": "5.5.21"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "cve@mitre.org"
}