---
title: "WEB-APP-002 Application .env File Readable by All Users"
canonical: https://openvapt.com/checks/WEB-APP-002.html
html: https://openvapt.com/checks/WEB-APP-002.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# WEB-APP-002 Application .env File Readable by All Users

Checks the permission bits of framework .env files for world-read access.

- Domain: Web Apps
- Severity: Medium
- Control category: Access Control
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- CIS Controls v8: 3.3
- NIST CSF 2.0: PR.AA-05, PR.DS-01
- CWE: CWE-732, CWE-312
- OWASP Top 10 2021: A05:2021, A02:2021
- OWASP ASVS 4.0.3: 14.1.3
- OWASP WSTG v4.2: WSTG-CONF-09
- NIST SP 800-53 Rev. 5: AC-3, SC-28

## Why It Matters

.env files hold database passwords, API tokens and signing keys in plain text. A world-readable .env hands every account on the server, including other websites' PHP-FPM pools, the keys to this application.

## How It Detects

Stats each .env file found in the project folders (metadata only) and fails when the 'other read' permission bit is set.

## How to Fix

chmod 640 .env && chown <app-user>:<web-group> .env  (or 600 when the application runs as its own user). Rotate the secrets if other people have had shell access.

## How to Verify

```
stat -c '%a %U:%G %n' .env  shows 640 or 600.
```

## Learn the Theory

- [A6 Application Framework and CMS Configuration](https://openvapt.com/academy/a6.md)

## References

- [OWASP Secrets Management Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html)
- [OWASP ASVS 4.0.3, V14 Configuration](https://github.com/OWASP/ASVS/blob/v4.0.3/4.0/en/0x22-V14-Config.md)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/web/frameworks.go

Run it: `openvapt scan --only WEB-APP-002`. Read it offline: `openvapt explain WEB-APP-002`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/WEB-APP-002.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
