Update app/common/src/main/java/stirling/software/common/service/SsrfProtectionService.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Anthony Stirling 2025-07-24 11:50:47 +01:00 committed by GitHub
parent dcb07480c6
commit 29e767cb73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -199,7 +199,10 @@ public class SsrfProtectionService {
}
private boolean isCloudMetadataAddress(String ip) {
// AWS/GCP/Azure metadata endpoints
return ip.startsWith("169.254.169.254") || ip.startsWith("fd00:ec2::254");
// Cloud metadata endpoints for AWS, GCP, Azure, Oracle Cloud, and IBM Cloud
return ip.startsWith("169.254.169.254") // AWS/GCP/Azure
|| ip.startsWith("fd00:ec2::254") // AWS IPv6
|| ip.startsWith("169.254.169.253") // Oracle Cloud
|| ip.startsWith("169.254.169.250"); // IBM Cloud
}
}