Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ GLSA 200409-05 ] Gallery: Arbitrary command execution
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index News & Announcements
View previous topic :: View next topic  
Author Message

Joined: 25 Feb 2003
Posts: 3829
Location: Essen, Germany

PostPosted: Thu Sep 02, 2004 9:14 pm    Post subject: [ GLSA 200409-05 ] Gallery: Arbitrary command execution Reply with quote

Gentoo Linux Security Advisory

Title: Gallery: Arbitrary command execution (GLSA 200409-05)
Severity: normal
Exploitable: remote
Date: September 02, 2004
Updated: May 22, 2006
Bug(s): #60742
ID: 200409-05


The Gallery image upload code contains a temporary file handling vulnerability which could lead to execution of arbitrary commands.


Gallery is a PHP script for maintaining online photo albums.

Affected Packages

Package: www-apps/gallery
Vulnerable: < 1.4.4_p2
Unaffected: >= 1.4.4_p2
Architectures: All supported architectures


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:
  • Make sure that your temporary directory is not contained in the webroot; by default it is located outside the webroot.
  • Disable upload rights to all albums for "EVERYBODY"; upload is disabled by default.
  • Disable debug and dev mode; these settings are disabled by default.
  • Disable allow_url_fopen in php.ini.


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

Last edited by GLSA on Tue May 23, 2006 4:17 am; edited 2 times in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index News & Announcements All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum