This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org
Difference between revisions of "Top 10 2013-A10-Unvalidated Redirects and Forwards"
m (Tried to get nicer align to point 3 in prevention box.) |
m (Category:OWASP Top Ten Project is already included in BottomAdvancedTemplate with English localization) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
|next={{Top_10:LanguageFile|text=whatsNextforDevelopers|language=en}} | |next={{Top_10:LanguageFile|text=whatsNextforDevelopers|language=en}} | ||
|useprev=2013PrevLink | |useprev=2013PrevLink | ||
− | |prev={{Top_10_2010:ByTheNumbers | + | |prev=A9-{{Top_10_2010:ByTheNumbers |
|9 | |9 | ||
|year=2013 | |year=2013 | ||
|language=en}} | |language=en}} | ||
+ | |year=2013 | ||
+ | |language=en | ||
}} | }} | ||
Line 49: | Line 51: | ||
# Simply avoid using redirects and forwards. | # Simply avoid using redirects and forwards. | ||
# If used, don’t involve user parameters in calculating the destination. This can usually be done. | # If used, don’t involve user parameters in calculating the destination. This can usually be done. | ||
− | # If destination parameters can’t be avoided, ensure that the supplied value is valid, and authorized for the user. | + | # If destination parameters can’t be avoided, ensure that the supplied value is valid, and authorized for the user.<br/> It is recommended that any such destination parameters be a mapping value, rather than the actual URL or portion of the URL, and that server side code translate this mapping to the target URL.<br/> Applications can use ESAPI to override the [http://owasp-esapi-java.googlecode.com/svn/trunk_doc/latest/org/owasp/esapi/filters/SecurityWrapperResponse.html sendRedirect()] method to make sure all redirect destinations are safe. |
− | |||
− | |||
Avoiding such flaws is extremely important as they are a favorite target of phishers trying to gain the user’s trust. | Avoiding such flaws is extremely important as they are a favorite target of phishers trying to gain the user’s trust. | ||
Line 82: | Line 82: | ||
|next={{Top_10:LanguageFile|text=whatsNextforDevelopers|language=en}} | |next={{Top_10:LanguageFile|text=whatsNextforDevelopers|language=en}} | ||
|useprev=2013PrevLink | |useprev=2013PrevLink | ||
− | |prev={{Top_10_2010:ByTheNumbers | + | |prev=A9-{{Top_10_2010:ByTheNumbers |
|9 | |9 | ||
|year=2013 | |year=2013 | ||
|language=en}} | |language=en}} | ||
+ | |year=2013 | ||
+ | |language=en | ||
}} | }} | ||
− | |||
− |
Latest revision as of 18:26, 15 June 2013
NOTE: THIS IS NOT THE LATEST VERSION. Please visit the OWASP Top 10 project page to find the latest edition.
← A9-Using Components with Known Vulnerabilities | What's Next for Developers → |
Threat Agents | Attack Vectors | Security Weakness | Technical Impacts | Business Impacts | |
---|---|---|---|---|---|
Application Specific | Exploitability AVERAGE |
Prevalence UNCOMMON |
Detectability EASY |
Impact MODERATE |
Application / Business Specific |
Consider anyone who can trick your users into submitting a request to your website. Any website or other HTML feed that your users use could do this. |
Attacker links to unvalidated redirect and tricks victims into clicking it. Victims are more likely to click on it, since the link is to a valid site. Attacker targets unsafe forward to bypass security checks. |
Applications frequently redirect users to other pages, or use internal forwards in a similar manner. Sometimes the target page is specified in an unvalidated parameter, allowing attackers to choose the destination page. Detecting unchecked redirects is easy. Look for redirects where you can set the full URL. Unchecked forwards are harder, because they target internal pages. |
Such redirects may attempt to install malware or trick victims into disclosing passwords or other sensitive information. Unsafe forwards may allow access control bypass. |
Consider the business value of retaining your users’ trust. What if they get owned by malware? What if attackers can access internal only functions |
Am I Vulnerable To 'Unvalidated Redirects and Forwards'?
The best way to find out if an application has any unvalidated redirects or forwards is to:
|
How Do I Prevent 'Unvalidated Redirects and Forwards'?
Safe use of redirects and forwards can be done in a number of ways:
Avoiding such flaws is extremely important as they are a favorite target of phishers trying to gain the user’s trust. |
Example Attack Scenarios
Scenario #1: The application has a page called “redirect.jsp” which takes a single parameter named “url”. The attacker crafts a malicious URL that redirects users to a malicious site that performs phishing and installs malware.
http://www.example.com/redirect.jsp?url=evil.com
Scenario #2: The application uses forwards to route requests between different parts of the site. To facilitate this, some pages use a parameter to indicate where the user should be sent if a transaction is successful. In this case, the attacker crafts a URL that will pass the application’s access control check and then forwards the attacker to administrative functionality for which the attacker isn’t authorized.
http://www.example.com/boring.jsp?fwd=admin.jsp
|
References
OWASP
External
|
← A9-Using Components with Known Vulnerabilities | What's Next for Developers → |