blob: 08546dc6fad575abd01a1c389ee51fc4065425a0 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<glsa id="200409-05">
<title>Gallery: Arbitrary command execution</title>
The Gallery image upload code contains a temporary file handling
vulnerability which could lead to execution of arbitrary commands.
<product type="ebuild">Gallery</product>
<announced>September 02, 2004</announced>
<revised>May 22, 2006: 02</revised>
<package name="www-apps/gallery" auto="yes" arch="*">
<unaffected range="ge">1.4.4_p2</unaffected>
<vulnerable range="lt">1.4.4_p2</vulnerable>
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".
<impact type="normal">
An attacker could run arbitrary code as the user running PHP.
There are several workarounds to this vulnerability:
<li>Make sure that your temporary directory is not contained in the
webroot; by default it is located outside the webroot.</li>
<li>Disable upload rights to all albums for "EVERYBODY"; upload is
disabled by default.</li>
<li>Disable debug and dev mode; these settings are disabled by
<li>Disable allow_url_fopen in php.ini.</li>
All Gallery users should upgrade to the latest version:
# emerge sync
# emerge -pv &quot;&gt;=www-apps/gallery-1.4.4_p2&quot;
# emerge &quot;&gt;=www-apps/gallery-1.4.4_p2&quot;</code>
<uri link="">Full Disclosure Announcement</uri>
<uri link=";name=News&amp;file=article&amp;sid=134&amp;mode=thread&amp;order=0&amp;thold=0">Gallery Announcement</uri>
<uri link="">CVE-2004-1466</uri>
<metadata tag="requester" timestamp="Sun, 22 Aug 2004 09:02:45 +0000">
<metadata tag="submitter" timestamp="Wed, 25 Aug 2004 23:33:36 +0000">