← PHP / Laravel · Contents

PHP-075 / Intermediate

Exposing configuration cache or environment variables (config:cache file)

A05:2021 Security Misconfiguration · CWE-200 Exposure of Sensitive Information

Why is this a problem?

If bootstrap/cache/config.php is public, all configuration values are revealed.

How to fix it

nginx
# Use only public as the document root and block web access to bootstrap/storage paths

Further reading