Difference between revisions of "Relative Path Traversal"

From OWASP
Jump to: navigation, search
Line 2: Line 2:
  
 
This attack is a variant of Path Traversal and can be exploited when the application accepts the use of relative traversal sequences such as "../".
 
This attack is a variant of Path Traversal and can be exploited when the application accepts the use of relative traversal sequences such as "../".
 +
 +
==Related Security Activities==
 +
 +
===How to Avoid Path Traversal Vulnerabilities===
 +
 +
See the [[:Category:OWASP Guide Project|OWASP Guide]] article on how to [[File_System#Path_traversal|Avoid Path Traversal ]] Vulnerabilities.
 +
 +
===How to Review Code for Path Traversal  Vulnerabilities===
 +
 +
See the [[:Category:OWASP Code Review Project|OWASP Code Review Guide]] article on how to [[Reviewing Code for Path Traversal  |Review Code for Path Traversal ]] Vulnerabilities.
 +
[[Category:FIXME|I do not see an article in the Code Review Guide]]
 +
 +
===How to Test for Path Traversal  Vulnerabilities===
 +
 +
See the [[:Category:OWASP Testing Project|OWASP Testing Guide]] article on how to [[Testing for Directory Traversal  |Test for Directory Traversal ]] Vulnerabilities.
 +
  
 
More detailed information can be found on [[Path_Traversal]]
 
More detailed information can be found on [[Path_Traversal]]

Revision as of 16:53, 11 August 2008

This is an Attack. To view all attacks, please see the Attack Category page.


This attack is a variant of Path Traversal and can be exploited when the application accepts the use of relative traversal sequences such as "../".

Related Security Activities

How to Avoid Path Traversal Vulnerabilities

See the OWASP Guide article on how to Avoid Path Traversal Vulnerabilities.

How to Review Code for Path Traversal Vulnerabilities

See the OWASP Code Review Guide article on how to Review Code for Path Traversal Vulnerabilities.

How to Test for Path Traversal Vulnerabilities

See the OWASP Testing Guide article on how to Test for Directory Traversal Vulnerabilities.


More detailed information can be found on Path_Traversal

Severity

High

Likelihood of exploitation

High

Examples

The following URLs are vulnerable to this attack:

 http://some_site.com.br/get-files.jsp?file=report.pdf  
 http://some_site.com.br/get-page.php?home=aaa.html  
 http://some_site.com.br/some-page.asp?page=index.html  

A simple way to execute this attack is like this:

 http://some_site.com.br/get-files?file=../../../../some dir/some file  
 http://some_site.com.br/../../../../etc/shadow  
 http://some_site.com.br/get-files?file=../../../../etc/passwd 

Related Threats

Category: Information Disclosure

Related Attacks

Related Vulnerabilities

Category:Input Validation Vulnerability

Related Countermeasures

Category:Input Validation