Menalto Gallery before 2.2.4 does not properly check for malicious file extensions during file uploads, which allows attackers to execute arbitrary code via the (1) Core application or (2) MIME module.
http://security.gentoo.org/glsa/glsa-200802-04.xml
http://secunia.com/advisories/28898