SQL injection vulnerability in the add_hit function in include/function.inc.php in Coppermine Photo Gallery (CPG) 1.4.8, when "Keep detailed hit statistics" is enabled, allows remote attackers to execute arbitrary SQL commands via the (1) referer and (2) user-agent HTTP headers.
http://www.vupen.com/english/advisories/2006/2317
http://www.securityfocus.com/archive/1/436799/30/4470/threaded