publish_xp_docs.php in Gallery 1.3.2 allows remote attackers to execute arbitrary PHP code by modifying the GALLERY_BASEDIR parameter to reference a URL on a remote web server that contains the code.
http://www.securityfocus.com/bid/6489
http://www.iss.net/security_center/static/10943.php
http://archives.neohapsis.com/archives/bugtraq/2002-12/0260.html