---
title: "WEB-APP-001 Laravel Debug Mode On or Application Key Missing"
canonical: https://openvapt.com/checks/WEB-APP-001.html
html: https://openvapt.com/checks/WEB-APP-001.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-001 Laravel Debug Mode On or Application Key Missing

Checks Laravel .env files for APP_DEBUG=true or an empty APP_KEY.

- Domain: Web Apps
- Severity: High
- Control category: Information Exposure
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- CIS Controls v8: 16.7
- NIST CSF 2.0: PR.PS-01
- CWE: CWE-489, CWE-209, CWE-321
- OWASP Top 10 2021: A05:2021
- OWASP ASVS 4.0.3: 14.3.2, 2.10.4
- OWASP WSTG v4.2: WSTG-CONF-02, WSTG-ERRH-01
- NIST SP 800-53 Rev. 5: CM-6, SI-11, IA-5

## Why It Matters

With APP_DEBUG on, Laravel's error page prints the environment, including database and mail passwords, to any visitor who triggers an error. APP_KEY encrypts sessions and cookies; with it empty or default the application refuses to run or signs nothing.

## How It Detects

Finds .env files in /srv, /opt, /var/www, home folders and web roots (three folders deep) that contain APP_KEY (the Laravel marker) and fails when APP_DEBUG is true or APP_KEY is empty. Values are never reported.

## How to Fix

Set APP_DEBUG=false and APP_ENV=production in .env, run php artisan key:generate if APP_KEY is empty, then php artisan config:cache. Keep .env outside the web root (Laravel's public/ folder) and readable only by the application user.

## How to Verify

```
grep -E '^APP_(DEBUG|KEY)=' .env  shows APP_DEBUG=false and a base64 key.
```

## Learn the Theory

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

## References

- [Laravel documentation, Deployment](https://laravel.com/docs/12.x/deployment)
- [Laravel documentation, Configuration (debug mode, environment files)](https://laravel.com/docs/12.x/configuration)
- [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-001`. Read it offline: `openvapt explain WEB-APP-001`.

---

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-001.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
