The miniSQL package (http://hughes.com.au) comes with a CGI (w3-msql) that can be exploited to run arbitrary code under the httpd user id. This vulnerability can be used to compromise the entire system security.
The overflow is possible due to the misuse of the scanf() function, which doesn't do correct bounds checking on the provided input.
The following is an exploit code for Solaris x86:
------- w3-msql-xploit.c ----------
/*
* !Hispahack Research Team
* http://hispahack.ccc.de
*
* Xploit for /cgi-bin/w3-msql (msql 2.0.4.1 - 2.0.11)
*
* Platform: Solaris x86
* Feel free to port it to other arquitectures, if you can...
* If so mail me plz.
*
* By: Zhodiac <zhodiac@softhome.net>
*
* Steps: 1) gcc -o w3-msql-xploit w3-msql-xploit.c
* 2) xhost +<target_ip>
* 3) ./w3-msql-xploit <target> <display> | nc <target> <http_port>
* 4) Take a cup of cofee, some kind of drug or wathever
* estimulates you at hacking time... while the xterm is comming
* or while you are getting raided.
*
* #include <standard/disclaimer.h>
*
* Madrid, 28/10/99
*
* Spain r0x
*
*/
Best solution is to wait for a new or patched version; meanwhile the following patch will stop this attack and some other (be aware that this patch was done after a total revision of the code, it's possible there are some other overflows).