PHP 4.0 Bug #9353: Require command reads /etc/passwd
| From: | sebastian at wolfgarten dot com | Date: | Tue, 20 Feb 2001 14:26:23 +0000 |
| Subject: | PHP 4.0 Bug #9353: Require command reads /etc/passwd | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47062@lists.php.net to get a copy of this message | ||
From: sebastian@wolfgarten.com
Operating system: Linux
PHP version: 4.0.1pl2
PHP Bug Type: Unknown/Other Function
Bug description: Require command reads /etc/passwd
Hello,
I have found a bug in PHP 4.01pl2 and maybe it exist in all other php versions too. A php script can
read all files on the system when the read flag for everyone is set for that file. This code shows
the problem:
<?
require('../../../../../../../etc/passwd');
?>
It is not a very serious bug but by reading local files a hacker might get important information he
(or she) could use to hack into the system.
Bye
Sebastian Wolfgarten
--
Edit Bug report at: http://bugs.php.net/?id=9353&edit=1