One thing you can do, although it does not offer much more security, is place the user/pass in a file outside of the directory tree that is exposed by the web server. If they break into the web server they can still access the user and pass from that file (it has to be readable by the httpd/cgi user), but it is a little more secure (depending on your configuration) than being directly stored in the cgi.