PHP File Inclusion

Thank you for visiting OWASP.org. We have migrated our community to a new web platform and regretably the content for this page needed to be programmatically ported from its previous wiki page. There’s still some work to be done.

Description

PHP, as many other languages, allows the inclusion 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’; ?>

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

References

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

[[Category:FIXME add links

In addition, one should classify vulnerability based on the following subcategories: Ex:[[Category:Error_Handling_Vulnerability|Category:Error Handling Vulnerability]]

Availability Vulnerability

Authorization Vulnerability

Authentication Vulnerability

Concurrency Vulnerability

Configuration Vulnerability

Cryptographic Vulnerability

Encoding Vulnerability

Error Handling Vulnerability

Input Validation Vulnerability

Logging and Auditing Vulnerability

Session Management Vulnerability]]

NOTOC

Category:OWASP ASDR Project Category:PHP Category:Vulnerability