php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11322 Security hole in multiuser environment
Submitted: 2001-06-06 16:28 UTC Modified: 2005-01-31 22:44 UTC
From: wangshui at nyist dot net Assigned:
Status: Not a bug Package: Safe Mode/open_basedir
PHP Version: 4.0.4pl1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wangshui at nyist dot net
New email:
PHP Version: OS:

 

 [2001-06-06 16:28 UTC] wangshui at nyist dot net
I'm a chinese user, and I give thousands of students websites with PHP-enabled within ONE machine. I found that:

There ARE some security holes in multiuser environment for PHP concerning file system functions and directory funtions:

1.file-system functions such as 'fopen' are restricted by 'safe mode' and 'open_basedir', but 'copy' only checks the 'source' argument, not the 'destination', so one can copy his own scripts to someone else' directory and bypass the 'open_basedir' restriction.

2.'dir' class is not restricted by 'safe mode' or 'open_basedir'!!!

3.'chdir' is dangerous. one user can 'chdir' to another user's directory and access the files.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-07 11:33 UTC] jflemer@php.net
It looks like the 'copy' command has been patched to check source and destination in CVS.
 [2002-06-02 13:39 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 07:01:27 2024 UTC