← PHP / Laravel · 目次

PHP-068 / 中級

信頼できないプロキシヘッダ(X-Forwarded-For)の使用

A05:2021 Security Misconfiguration · CWE-348 Use of Less Trusted Source

なぜ問題になるのか?

IP ベースの制限・監査ログを攻撃者が偽造できます。

修正方法

php
protected $proxies = ['10.0.0.5'];   // 実際のロードバランサ IP のみ

参考資料