← PHP / Laravel · 目次

PHP-075 / 中級

設定キャッシュ・環境変数の外部露出(config:cache ファイル)

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

なぜ問題になるのか?

bootstrap/cache/config.php が公開されるとすべての設定値が明らかになります。

修正方法

nginx
# public のみドキュメントルートとし、bootstrap/storage パスは Web から遮断

参考資料