Gentoo Logo

Gallery 1.4.1 and below remote exploit vulnerability

Content:

1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200402-04 / Gallery
Release Date February 11, 2004
Latest Revision February 11, 2004: 01
Impact normal
Exploitable remote
Package Vulnerable versions Unaffected versions Architecture(s)
www-apps/gallery < 1.4.1_p1 >= 1.4.1_p1 All supported architectures

Related bugreports: #39638

Synopsis

The Gallery developers have discovered a potentially serious security flaw in Gallery 1.3.1, 1.3.2, 1.3.3, 1.4 and 1.4.1 which can allow a remote exploit of your webserver.

2.  Impact Information

Background

Gallery is an open source image management system written in PHP. More information is available at http://gallery.sourceforge.net

Description

Starting in the 1.3.1 release, Gallery includes code to simulate the behaviour of the PHP 'register_globals' variable in environments where that setting is disabled. It is simulated by extracting the values of the various $HTTP_ global variables into the global namespace.

Impact

A crafted URL such as http://example.com/gallery/init.php?HTTP_POST_VARS=xxx causes the 'register_globals' simulation code to overwrite the $HTTP_POST_VARS which, when it is extracted, will deliver the given payload. If the payload compromises $GALLERY_BASEDIR then the malicious user can perform a PHP injection exploit and gain remote access to the webserver with PHP user UID access rights.

3.  Resolution Information

Workaround

The workaround for the vulnerability is to replace init.php and setup/init.php with the files in the following ZIP file: http://prdownloads.sourceforge.net/gallery/patch_1.4.1-to-1.4.1-pl1.zip?download

Resolution

All users are encouraged to upgrade their gallery installation:

Code Listing 3.1: Resolution

# emerge sync
# emerge -p ">=www-apps/gallery-1.4.1_p1"
# emerge ">=www-apps/gallery-1.4.1_p1"


Print

Page updated February 11, 2004

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

Copyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.