Lucene search

K
freebsdFreeBSDEDABE438-542F-11DB-A5AE-00508D6A62DF
HistoryOct 02, 2006 - 12:00 a.m.

php -- open_basedir Race Condition Vulnerability

2006-10-0200:00:00
vuxml.freebsd.org
16

CVSS2

6.2

Attack Vector

LOCAL

Attack Complexity

HIGH

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:L/AC:H/Au:N/C:C/I:C/A:C

EPSS

0.001

Percentile

21.1%

Stefan Esser reports:

PHP’s open_basedir feature is meant to disallow scripts to
access files outside a set of configured base directories.
The checks for this are placed within PHP functions dealing
with files before the actual open call is performed.
Obviously there is a little span of time between the check
and the actual open call. During this time span the checked
path could have been altered and point to a file that is
forbidden to be accessed due to open_basedir restrictions.
Because the open_basedir restrictions often not call PHP
functions but 3rd party library functions to actually open
the file it is impossible to close this time span in a
general way. It would only be possible to close it when PHP
handles the actual opening on it’s own.
While it seems hard to change the path during this little
time span it is very simple with the use of the symlink()
function combined with a little trick. PHP’s symlink()
function ensures that source and target of the symlink
operation are allowed by open_basedir restrictions (and
safe_mode). However it is possible to point a symlink to
any file by the use of mkdir(), unlink() and at least two
symlinks.

CVSS2

6.2

Attack Vector

LOCAL

Attack Complexity

HIGH

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:L/AC:H/Au:N/C:C/I:C/A:C

EPSS

0.001

Percentile

21.1%

Related for EDABE438-542F-11DB-A5AE-00508D6A62DF