php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17156 readfile can bypass safe_mode
Submitted: 2002-05-11 15:22 UTC Modified: 2002-05-11 16:00 UTC
From: ilia at prohost dot org Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.2.0 OS: Linux 2.4.18
Private report: No CVE-ID: None
 [2002-05-11 15:22 UTC] ilia at prohost dot org
If a readfile() function is passed 2nd parameter it can be used to read ANY file on the system regardless of safe_mode.

ex.

<?php
readfile('/etc/passwd', 1);
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-11 16:00 UTC] rasmus@php.net
Fixed in CVS (for all functions with a safemode_include_dir switch).  Note that this was only a problem if the safemode_include_dir was not defined in the php.ini file.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 16:01:31 2024 UTC