PHP-067 / Intermediate
Trusting the Host header (password-reset link poisoning)
Why is this a problem?
An attacker alters the Host header so the victim receives a link to a malicious domain.
How to fix it
php
// Fix APP_URL in .env and allow only approved domains through TrustHosts middleware
protected function hosts() { return ['^app\.example\.com$']; } // TrustHosts