RedTeam found a information disclosure vulnerability in Pico Server (pServ) which results in a local user reading all files on the server with pServ's permissions. Versions 3.2 and below are susceptible.
Advisory: Pico Server (pServ) Local Information Disclosure
RedTeam found a local information disclosure vulnerability in Pico Server
(pServ) which results in a local user reading all files on the server with
Product: Pico Server (pServ)
Affected Version: 3.3, 3.2(verified), < 3.2 probably too
Immune Version: none
OS affected: all
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 follows symlinks without checking whether a symlink points outside the
pServ does not distinguish normal files from symlinks. Unfortunately it does
furthermore only check the link itself but not check if the symlink target is
still in the webroot. That is why an attacker with access to a directory on
the web server (e.g. via ftp) can put a symlink to any file on the server
there. He can then retrieve that file (if pServe has the permission to read
it) through the web server by navigating his browser to that link.
Proof of Concept
Retrieving /etc/shadow if pServe runs as root:
1. As user go to your web-directory e.g.: cd /usr/local/var/www/userdir
2. Create a link to /etc/shadow: ln -s /etc/shadow
3. Retrieve the shadow file by pointing your browser to
pServe should run as a user with minimal privileges. Files that should not be
read by unprivileged users should have their permissions set accordingly.
The problem will not be fixed in the next version of pServ. From version 3.3
on there is a hint in the readme file that informs of this issue.
The security risk is rated low because an attacker must already have access
to the system. Also usually the administrator will run pServ with minimal
privileges. On the other hand a user could place a link to some directory
(e.g.: / ) without knowing what he is doing.
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 got the information that the problem will not be fixed. Advisory
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) Symlink Privileged File Disclosure
Local Access Required
Loss of Confidentiality
pServ contains a flaw that may allow a malicious user to view arbitrary files on the system. The issue is due to the web server not differentiating between files and symbolic links. It is possible for a local user with access to the web server directory to create a symbolic link from a critical file on the system to a file in the web server. Visiting the link via the server will disclose the contents of the linked file resulting in a loss of confidentiality.
Currently, there are no known upgrades, patches, or workarounds available to correct this issue.
Discovered by Claus R. F. Overbeck <firstname.lastname@example.org>.
Pserv Pserv 3.3
Pserv Pserv 3.2
pServ is prone to an information disclosure vulnerability through symbolic link files. This occurs because the application will follow symbolic links to files outside the Web root.
This issue was reported to affect pServ 3.2 and 3.3; other versions are likely vulnerable.
An exploit is not required.
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@example.com <mailto:firstname.lastname@example.org>.