High severityPHPServer-Side Request Forgery (SSRF)MEDIUM confidence
Open Redirect
A user-controlled value is placed in a Location redirect header, enabling an open redirect (CWE-601) usable for phishing and OAuth token theft.
Standards mapping
- OWASP Top 10
- A01:2021 - Broken Access Control
- OWASP ASVS
- V5.1.5 (L1)
Vulnerable vs. safe
Flagged by this check
header("Location: " . $next);Passes - the safe pattern
header("Location: /dashboard");Why it matters & how to fix it
A user-controlled value is placed in a Location redirect header, enabling an open redirect (CWE-601) usable for phishing and OAuth token theft. Redirect only to a fixed set of internal paths, or validate the target against an allow-list of hosts; never redirect to a raw request parameter.
References
Rule ID integsec-php-open-redirect - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- PHP - Server-Side Request Forgery (SSRF)SSRF Curl
- PHP - Server-Side Request Forgery (SSRF)SSRF File Get Contents URL
- PHP - Authentication & SecretsDisabled TLS Verification
- PHP - Authentication & SecretsHardcoded Credentials
- PHP - Authentication & SecretsHardcoded DB Credentials
- PHP - CryptographyInsecure Random Token