A .env file holds your application's real secrets — database passwords, API keys, third-party credentials — in plain text. If it's sitting in your site's public web root, anyone who requests yoursite.com/.env can read every one of those secrets directly.
An exposed .env file reveals database credentials, API keys, and secret tokens — complete account compromise in seconds. This is one of the most common and catastrophic misconfigurations.
Publicly accessible .env and credential files represent one of the more severe, directly exploitable vulnerabilities a website can have, since these files typically contain genuine, sensitive configuration data — database credentials, API keys, secret tokens — that provide direct, often immediate access to systems and data well beyond the website itself if discovered and accessed by an attacker.
This vulnerability commonly occurs through a specific, avoidable configuration oversight — development environment files not properly excluded from the publicly accessible web root, meaning a file intended purely for server-side configuration reading becomes directly downloadable by anyone who knows or guesses its location.
The severity here genuinely exceeds most other individual security issues discussed throughout this broader hardening work, since successful exploitation doesn't require any sophisticated attack technique — an attacker who discovers this exposure gains direct access to whatever credentials the file contains, potentially providing immediate access to databases, third-party services, or other systems the exposed credentials protect.
Verification and remediation here deserve genuine priority and thoroughness — confirming these files are genuinely inaccessible from the public web, not merely absent from obvious locations, and reviewing your broader deployment process to ensure this category of file is consistently, reliably excluded from public access going forward, addresses both the immediate exposure and the underlying process gap that allowed it.
https://yoursite.com/.env returns a 403 or 404, and every credential that was in the file has been rotated.
Fix it, then re-scan — the check confirms itself. No manual checkbox, the scan is the truth.
Run this check in H.I.V.E. →