Gallery 2 up to 2.0.2 allows remote attackers to spoof their IP address via a modified X-Forwarded-For (X_FORWARDED_FOR) HTTP header, which is checked by Gallery before other more reliable sources of IP address information, such as REMOTE_ADDR.
https://exchange.xforce.ibmcloud.com/vulnerabilities/25120
http://www.vupen.com/english/advisories/2006/0813
http://www.gulftech.org/?node=research&article_id=00106-03022006
http://securitytracker.com/id?1015717
http://secunia.com/advisories/19104
http://gallery.menalto.com/gallery_2.0.3_released
http://archives.neohapsis.com/archives/bugtraq/2006-02/0621.html