php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9000 echo `cat /etc/passwd` -- bypasses open_basedir .
Submitted: 2001-01-30 07:47 UTC Modified: 2005-01-31 22:39 UTC
From: henka at isp dot org dot za Assigned:
Status: Closed Package: Safe Mode/open_basedir
PHP Version: 4.0.4pl1 OS: linux 2218
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: henka at isp dot org dot za
New email:
PHP Version: OS:

 

 [2001-01-30 07:47 UTC] henka at isp dot org dot za
Even with open_basedir . configured in php.ini, the following bypasses it with concerning ease:

	echo `cat /etc/passwd`;

The fact that open_basedir is in force is obvious when we try fopen ("/etc/passwd", "r"), etc - ie, the expected open_basedir error pops up.

Surely this is not a bug?  If so, is there a way to disable backticks?

I'll wait for some kind of response before I send this to the usual support mailing lists.

Patches

123 (last revision 2013-05-05 04:24 UTC by 123321 at qq dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-03 18:25 UTC] david@php.net
safe_mode disables ``
safe_mode_exec_dir specifies a base directory for executables
disable_functions allows you to turn disable certain functions completely
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 06:01:28 2024 UTC