PHP-018 / 上級
SSRF:利用者指定 URL へのサーバーリクエスト
なぜ問題になるのか?
内部ネットワーク(169.254.169.254 メタデータ、localhost 管理 API)にアクセスできます。
修正方法
php
$endpoint = config('integrations.endpoints')[$serviceId] ?? null;
abort_if($endpoint === null, 422);
Http::withoutRedirecting()->get($endpoint);