The web application sends a redirect to another location, but instead of exiting, it executes additional code.

Primary

Redirect Without Exit

Implementation

Other
Confidentiality
Integrity
Availability
Alter Execution Logic
Execute Unauthorized Code or Commands
This weakness could affect the control flow of the application and allow execution of untrusted code.

Black Box
This issue might not be detected if testing is performed using a web browser, because the browser might obey the redirect and move the user to a different page before the application has produced outputs that indicate something is amiss.

This code queries a server and displays its status when a request comes from an authorized IP address.

$requestingIP = $_SERVER['REMOTE_ADDR'];if(!in_array($requestingIP,$ipAllowList)){echo "You are not authorized to view this page";http_redirect($errorPageURL);}$status = getServerStatus();echo $status;
...

This code redirects unauthorized users, but continues to execute code after calling http_redirect(). This means even unauthorized users may be able to access the contents of the page or perform a DoS attack on the server being queried. Also, note that this code is vulnerable to an IP address spoofing attack (CWE-212).

CVE-2013-1402
Execution-after-redirect allows access to application configuration details.
https://www.cve.org/CVERecord?id=CVE-2013-1402

CVE-2009-1936
chain: library file sends a redirect if it is directly requested but continues to execute, allowing remote file inclusion and path traversal.
https://www.cve.org/CVERecord?id=CVE-2009-1936

CVE-2007-2713
Remote attackers can obtain access to administrator functionality through EAR.
https://www.cve.org/CVERecord?id=CVE-2007-2713

CVE-2007-4932
Remote attackers can obtain access to administrator functionality through EAR.
https://www.cve.org/CVERecord?id=CVE-2007-4932

CVE-2007-5578
Bypass of authentication step through EAR.
https://www.cve.org/CVERecord?id=CVE-2007-5578

CVE-2007-2713
Chain: Execution after redirect triggers eval injection.
https://www.cve.org/CVERecord?id=CVE-2007-2713

CVE-2007-6652
chain: execution after redirect allows non-administrator to perform static code injection.
https://www.cve.org/CVERecord?id=CVE-2007-6652

Allowed
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

CWE Content Team
MITRE
2008-09-09
1.0
2008-09-09

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated Common_Consequences, Demonstrative_Examples, Relationships

CWE Content Team
MITRE
2012-10-30
updated Demonstrative_Examples

CWE Content Team
MITRE
2013-02-21
updated Alternate_Terms, Name, Observed_Examples, References

CWE Content Team
MITRE
2014-07-30
updated Relationships

CWE Content Team
MITRE
2020-02-24
updated Relationships

CWE Content Team
MITRE
2020-06-25
updated Demonstrative_Examples

CWE Content Team
MITRE
2022-10-13
updated References

CWE Content Team
MITRE
2023-04-27
updated Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes

CWE Content Team
MITRE
2023-10-26
updated Demonstrative_Examples

CWE Content Team
MITRE
2025-09-09
4.18
2025-09-09
updated References

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Applicable_Platforms

Redirect Without Exit