Bug 25272 - Using lang/eperl as cgi/nph binary executor can give anybody the ability to view the content of any file
Summary: Using lang/eperl as cgi/nph binary executor can give anybody the ability to v...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-02-22 03:50 UTC by skywizard
Modified: 2005-04-17 15:57 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skywizard 2001-02-22 03:50:01 UTC
Anybody can view the content of (any? ) file (especially cgi script) 
if the server using eperl (current version is 2.2.14) as server side
scripting, especially as external "/cgi-bin/nph-eperl"

Fix: 

Maybe we can tweak the server config?
(I'm still doing some "brute attack" to my very own server)
How-To-Repeat: browse to "http://any_server_using_eperl/cgi-bin/nph-eperl/cgi-bin/any_cgi_script"

example:
http://www.cdrom.com/cgi-bin/nph-eperl/cgi-bin/OpenCart.cgi
(sorry)
Comment 1 Michael Haro freebsd_committer freebsd_triage 2001-04-03 12:40:54 UTC
Responsible Changed
From-To: freebsd-ports->rse

Over to maintainer
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2004-03-14 22:50:05 UTC
Responsible Changed
From-To: rse->freebsd-ports-bugs

rse no longer has time to look after this port, so reset the 
Responsible line.  The port is available for adoption ...
Comment 3 Florent Thoumie freebsd_committer freebsd_triage 2005-04-12 10:44:38 UTC
State Changed
From-To: open->feedback

Have you sent a problem report to the upstream developers too? 

I'm not sure that's FreeBSD specific.
Comment 4 Sam Lawrance freebsd_committer freebsd_triage 2005-04-17 12:21:57 UTC
More information:

The behaviour outlined in the PR is described in both eperl
documentation and code, and is not FreeBSD specific.

When invoked as a cgi or nph-cgi executable with a script name as the
argument, the script is interpreted as an eperl script relative to the
server document root. The result is sent to the client.

Files ending in .html, .phtml, .ephtml, .epl, .pl, .cgi are interpreted
in this manner.  The worst result is unintended disclosure of a file
under the document root and ending in one of those extensions.

Refs: ${WRKSRC}/NEWS, INSTALL.APACHE and eperl_main.c
Comment 5 Sam Lawrance freebsd_committer freebsd_triage 2005-04-17 15:55:12 UTC
State Changed
From-To: feedback->closed

The problem described is not specific to FreeBSD.  A warning has 
been added to pkg-message describing the consequences of using 
eperl in CGI mode.