You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Robert S. Thau" <rs...@ai.mit.edu> on 1995/04/07 19:52:43 UTC

NCSA 1.4b3-3 security hole

Well, I just took a look at NCSA 1.4b3-3.

While an attacker can no longer look at the source code of
/~purebred/foo.cgi by adding a slash to the URL, the problem isn't
really gone.  They still get the code if they add *two* slashes.

Even the one-slash case isn't really handled right --- it does invoke
the script, but PATH_INFO and SCRIPT_NAME are both set wrong
(SCRIPT_NAME has the slash appended, and PATH_INFO, which should have
the slash, is null).  This could make a difference if SCRIPT_NAME is
being used, say, to find data files, and an incorrect value can trick
the script into reading inappropriate stuff.  (This is easy enough for
the attacker to determine --- remember, they've got the source code).

>From the looks of the code, the two-slash business is just a simple
oversight, but where security is concerned, simple oversights are
deadly.  Deadline pressure is sometimes good, but it's also sometimes
good to slow down, think things over, and be sure you've got it right. 

rst