ghostscript before 6.53 allows attackers to execute arbitrary commands by using .locksafe or .setsafe to reset the current pagedevice.
ftp://ftp.caldera.com/pub/security/OpenLinux/CSSA-2002-026.0.txt
www.ghostscript.com/pipermail/gs-code-review/2002-February/001900.html
www.ghostscript.com/pipermail/gs-code-review/2002-January/001801.html
www.iss.net/security_center/static/9254.php
www.redhat.com/support/errata/RHSA-2002-083.html
www.redhat.com/support/errata/RHSA-2002-123.html
www.redhat.com/support/errata/RHSA-2003-209.html
www.securityfocus.com/bid/4937