Bug #73708 [Opn]: php .user.ini conf file design issue resulting in bypass
| From: | tr3jer at gmail dot com | Date: | Sun, 11 Dec 2016 07:48:47 +0000 |
| Subject: | Bug #73708 [Opn]: php .user.ini conf file design issue resulting in bypass | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205912@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73708&edit=1
ID: 73708
User updated by: tr3jer at gmail dot com
Reported by: tr3jer at gmail dot com
Summary: php .user.ini conf file design issue resulting in
bypass
Status: Open
Type: Bug
Package: *Configuration Issues
Operating System: all
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
but this is .user.ini fault, .user.ini set open_basedir=/home/wwwroot/default, just It should not
cross the directoryï¼
Previous Comments:
------------------------------------------------------------------------
[2016-12-10 12:26:05] requinix@php.net
Yes, a setting in default/bypass/.user.ini will override a setting in default/.user.ini. That is how
it is supposed to work.
If an attacker is able to create files on the server then PHP cannot stop them. If open_basedir is a
problem then it should be set at the server level (eg, php.ini).
------------------------------------------------------------------------
[2016-12-10 12:01:31] tr3jer at gmail dot com
os is all
------------------------------------------------------------------------
[2016-12-10 11:50:29] tr3jer at gmail dot com
Description:
------------
hello! php security team.I find one .user.ini vulnerabilityinfluences all have .user.ini php
versionstest verision = php5.4.user.ini Can be configured open_basedirï¼so...here i use
open_basedir as exampleimage1:http://7xiw31.com1.z0.glb.clouddn.com/QQ20161210-1@2x.pngSo
that attackers can not cross this directory and read system fileimage2:http://7xiw31.com1.z0.glb.clouddn.com/QQ20161210-0@2x.pngI
think .user.ini just The current directory takes effectï¼so...again write one .user.ini And the
original Do not conflictï¼
Test script:
---------------
We just have upload file Permissionsï¼image3:http://7xiw31.com1.z0.glb.clouddn.com/QQ20161210-4@2x.pngcreate
new directory and write new .user.iniï¼open_basedir=/image4:http://7xiw31.com1.z0.glb.clouddn.com/QQ20161210-1@2x.pngyepï¼don't
need restartï¼just wait a few minutesï¼can bypass .user.ini limitï¼image5:http://7xiw31.com1.z0.glb.clouddn.com/QQ20161210-3@2x.png
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73708&edit=1