.env file is a dotenv environment configuration file that has been accidentally deployed to a web-accessible location, making its contents readable by anyone who requests it. .env files typically contain database passwords, API keys, application secrets, JWT signing keys, OAuth client secrets, and other credentials that should never be publicly accessible.
DATABASE_URL, DB_PASSWORD, connection stringsSECRET_KEY, APP_SECRET, JWT signing secretsThe most common causes:
.env file is placed in the web server's document root (the publicly served directory) instead of above it.env file to a publicly served directory.env.bak, .env.old, .env.1) are accidentally created in served directories
Immediate steps: rotate every credential in the file immediately — assume they have been compromised. Remove the file from the public path. Configure the web server to block access to dotfiles. Add .env to .gitignore and audit git history for committed secrets. Use a secrets management solution (AWS Secrets Manager, HashiCorp Vault, environment variables injected at runtime) rather than file-based configuration.
Exposed .env File describes a security concept that affects how teams understand, monitor, and reduce external exposure across internet-facing assets.
It matters because attackers continuously inspect public assets. Tracking this concept helps teams reduce exploitable exposure before it becomes a breach path.
VeilScan discovers public assets, validates findings with proof, prioritises issues by business impact, and explains remediation in reports built for engineering and leadership.