RedTeam found a information disclosure vulnerability in Pico Server (pServ) which gives an attacker the ability to read all files from cgi-bin. Versions 3.2 and below are susceptible.
Advisory: Pico Server (pServ) Information Disclosure Of CGI Sources
RedTeam found a Information Disclosure vulnerability in Pico Server (pServ)
which gives an attacker the ability to read all files from cgi-bin.
Product: Pico Server (pServ)
Affected Version: 3.2(verified), <=3.2 probably too
Immune Version: 3.3
OS affected: all
Vendor-Status: new version available
Pico Server is a small web server. It is meant to be portable and
* small, portable
* CGI-BIN support
* auto-indexing of directories
* access and error logging (see p-reporter for an analyzer)
* forking or single-connection at choice
Pico Server (pServ) is written in portable C (K&R style so it can compile on
older compilers too) and sports several options that by means of #define
statements can customize the behavior, the performance and the feature set so
to be able to fit better the the requisites.
Pserv does not correctly check whether a user accesses a file in cgi-bin and
gives away the source instead of executing it.
pServ has CGI-BIN support. Only URLs beginning with "cgi-bin" are treated as
pServ checks, whether a file is in cgi-bin by checking whether the beginning
of the directory part of the url matches "cgi-bin". A user can circumvent
this by asking for /somedir/../cgi-bin/ and therefore is able to retrieve the
complete sourcecode of all scripts in cgi-bin.
Proof of Concept
This url lets us download the source of test.pl instead of executing it.
The Developers have released Version 3.3. This version should fix the
problem. The changes have not been tested by RedTeam, yet.
The security risk is rated medium because a remote attacker can get source
code that would otherwise not be available to him. This can help the attacker
in further attacks. As many programmers put sensitive configuration
parameters like database passwords in the source code this attack can be
2005-05-02 first attempt to inform developers
2005-05-02 CAN-number assigned
2005-05-04 second attempt to inform developers
2005-05-16 new version released. Advisory published.
RedTeam is a penetration testing group working at the Laboratory for
Dependable Distributed Systems at RWTH-Aachen University. You can find more
Information on the RedTeam Project at
Pico Server (pServ) Crafted Request CGI Source Disclosure
Remote / Network Access
Loss of Confidentiality
pServ contains a flaw that may lead to an unauthorized information disclosure. The issue is due to pServ only treating URLs beginning with "cgi-bin" as valid CGI script requests. By sending a crafted command such as "/somedir/../cgi-bin/file.cgi", the server will treat it as a standard request for a file and not process the CGI requested; displaying the source code instead.
Upgrade to version 3.3 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.