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 "PHP File Inclusion"

From OWASP
Jump to: navigation, search
m (Reverted edits by Jenjava1762 (talk) to last revision by Imifos)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Template:Stub}}
 
{{Template:Vulnerability}}
 
{{Template:Vulnerability}}
{{Template:Stub}}
 
 
 
[[Category:FIXME|This is the text from the old template. This needs to be rewritten using the new template.]]
 
 
  
 
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
 
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
  
 
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
 
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
 
[[ASDR Table of Contents]]
 
__TOC__
 
 
  
 
==Description==
 
==Description==
  
PHP as many other languages allow the inclution of files in order to provide or extend the functionality of the current file.
+
PHP, as many other languages, allows the inclution of files in order to provide or extend the functionality of the current file.
  
 
==Risk Factors==
 
==Risk Factors==
Line 25: Line 17:
 
==Examples==
 
==Examples==
  
<?PHP  
+
<?PHP  
include '/path/filename.php';
+
include '/path/filename.php';
include_once 'path/filename.class.php';
+
include_once 'path/filename.class.php';
require '../path/filename.inc';
+
require '../path/filename.inc';
require_once 'filename.inc.php';
+
require_once 'filename.inc.php';
?>
+
?>
  
 
==Related [[Attacks]]==
 
==Related [[Attacks]]==
Line 93: Line 85:
 
[[Category:OWASP ASDR Project]]
 
[[Category:OWASP ASDR Project]]
 
[[Category:PHP]]
 
[[Category:PHP]]
 +
[[Category:Vulnerability]]

Latest revision as of 03:14, 1 February 2016

This article is a stub. You can help OWASP by expanding it or discussing it on its Talk page.


This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.


Last revision (mm/dd/yy): 02/1/2016

Vulnerabilities Table of Contents

Description

PHP, as many other languages, allows the inclution of files in order to provide or extend the functionality of the current file.

Risk Factors

TBD


Examples

<?PHP 
include '/path/filename.php';
include_once 'path/filename.class.php';
require '../path/filename.inc';
require_once 'filename.inc.php';
?>

Related Attacks

  • Remote file inclusion using variables from the request POST or GET


Related Vulnerabilities

Related Controls


Related Technical Impacts


References

Note: A reference to related CWE or CAPEC article should be added when exists. Eg: