Gallery: Arbitrary command execution The Gallery image upload code contains a temporary file handling vulnerability which could lead to execution of arbitrary commands. Gallery 2004-09-02 2006-05-22 60742 remote 1.4.4_p2 1.4.4_p2

Gallery is a PHP script for maintaining online photo albums.

The upload handling code in Gallery places uploaded files in a temporary directory. After 30 seconds, these files are deleted if they are not valid images. However, since the file exists for 30 seconds, a carefully crafted script could be initiated by the remote attacker during this 30 second timeout. Note that the temporary directory has to be located inside the webroot and an attacker needs to have upload rights either as an authenticated user or via "EVERYBODY".

An attacker could run arbitrary code as the user running PHP.

There are several workarounds to this vulnerability:

All Gallery users should upgrade to the latest version:

# emerge sync # emerge -pv ">=www-apps/gallery-1.4.4_p2" # emerge ">=www-apps/gallery-1.4.4_p2"
Full Disclosure Announcement Gallery Announcement CVE-2004-1466 jaervosz chriswhite