Skip to content

MIR0812

TaintedInclude

User-controlled input reaches the path of include, include_once, require or require_once, letting an attacker run any local (or remote) PHP file.

<?php
include $_GET['page'] . '.php'; // TaintedInclude

Map the input to a fixed list of files instead of building the path from it.