This vulnerability occurs in PHP applications that rely on the deprecated, auto-registered global variables for file uploads (like $varname, $varname_size). Because these variables are not properly validated, an attacker can overwrite them to trick the application into processing malicious or unauthorized files.
In older PHP configurations, file uploads automatically created a set of global variables for each file. Attackers can exploit this by sending forged POST requests or manipulated cookies that overwrite these variables with their own values. Since the application trusts these globals without verification, it can be deceived into handling files it was never intended to, such as sensitive system files. To prevent this, developers must stop using these legacy global variables entirely. The secure alternative is to use the validated $_FILES superglobal array, which is populated directly by the PHP engine and is immune to this type of user-supplied data overwrite. Modern PHP versions have disabled the automatic creation of these global variables ('register_globals' is off by default), making this a legacy issue for outdated codebases.
Impact: Read Files or DirectoriesModify Files or Directories
phpphp