source: http://www.securityfocus.com/bid/22700/info

Simple one-file gallery is prone to multiple input-validation vulnerabilities, including a local file-include issue and a cross-site scripting issue.

An attacker can exploit these issues to steal cookie-based authentication credentials and to view and execute arbitrary local files within the context of the affected webserver. Other attacks are also possible. 

http://www.example.com/gallery.php?f=../../../../../../../../../../../../etc/passwd