发布时间 :2005-05-16 00:00:00
修订时间 :2016-10-17 23:19:21

[原文]Pico Server (pServ) 3.2 and earlier allows remote attackers to obtain the source code for CGI scripts via "dirname/../cgi-bin" in a URL.


        Pico Server (pServ) 3.2及更早版本允许远程攻击者通过在一个URL内的"dirname/../cgi-bin"获取CGI脚本的源码。

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

- CPE (受影响的平台与产品)


- OVAL (用于检测的技术细节)


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  FULLDISC  20050516 Pico Server (pServ) Information Disclosure Of CGI Sources
(UNKNOWN)  BID  13638

- 漏洞信息

高危 设计错误
2005-05-16 00:00:00 2006-05-04 00:00:00
        Pico Server (pServ) 3.2及更早版本允许远程攻击者通过在一个URL内的"dirname/../cgi-bin"获取CGI脚本的源码。

- 公告与补丁

        Pserv Pserv 3.2
        pServ pserv-3.3.tar.gz

- 漏洞信息 (F39268)

rt-sa-2005-011.txt (PacketStormID:F39268)
2005-08-14 00:00:00
exploit,cgi,info disclosure

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
Security-Risk: medium
Remote-Exploit: yes
Vendor-Status: new version available
Advisory-Status: published
CVE: CAN-2005-1366
( #)


Pico Server is a small web server. It is meant to be portable and

* small, portable
* fast
* 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.

More Details

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 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.

Security Risk

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
quite harmful.


2005-04-29 found
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 Information Disclosure
Loss of Confidentiality
Exploit Public

- 漏洞描述

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.

- 时间线

2005-05-16 2005-04-29
2005-05-16 Unknow

- 解决方案

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.

- 相关参考

- 漏洞作者

- 漏洞信息

PServ Remote Source Code Disclosure Vulnerability
Design Error 13638
Yes No
2005-05-16 12:00:00 2009-07-12 02:56:00
Discovery is credited to Claus R. F. Overbeck <>.

- 受影响的程序版本

Pserv Pserv 3.2
Pserv Pserv 3.3

- 不受影响的程序版本

Pserv Pserv 3.3

- 漏洞讨论

pServ is affected by a remote source code disclosure vulnerability.

When handling a specially-crafted URI request, the application discloses the source code of scripts in the 'cgi-bin' directory.

Information gathered through this attack could be used to launch further attacks against a system.

- 漏洞利用

An exploit is not required.

The following proof of concept is available:

- 解决方案

pserv 3.3 is invulnerable to this issue.

Pserv Pserv 3.2

- 相关参考