Title: PHP Realpath() Safe_Mode and Open_Basedir Restriction Bypass Vulnerability
Severity: LOW
Description:
PHP is a general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
PHP is prone to a 'safe_mode' and 'open_basedir' restriction-bypass vulnerability. Successful exploits could allow an attacker to determine the presence of files in unauthorized locations.
Specifically, the vulnerability resides in the 'realpath()' function, which fails to use 'file_exists()' to prevent unauthorized users from checking the existence of files.
Exploiting this issue allows attackers to gain access to sensitive data that could be used in other attacks.
This vulnerability would be an issue in shared-hosting configurations where multiple users can create and execute arbitrary PHP script code; in such cases, the 'safe_mode' and 'open_basedir' restrictions are expected to isolate users from each other.
Versions prior to PHP 5.2.3 are vulnerable to this issue.
Affected Products:
- Debian Linux 4.0
- Debian Linux 4.0 alpha
- Debian Linux 4.0 amd64
- Debian Linux 4.0 arm
- Debian Linux 4.0 hppa
- Debian Linux 4.0 ia-32
- Debian Linux 4.0 ia-64
- Debian Linux 4.0 m68k
- Debian Linux 4.0 mips
- Debian Linux 4.0 mipsel
- Debian Linux 4.0 powerpc
- Debian Linux 4.0 s/390
- Debian Linux 4.0 sparc
- Linux kernel 2.4.19
- Linux kernel 2.4.21
- Linux kernel 2.6.5
- PHP PHP 5.0.0 .0
- PHP PHP 5.0.0 candidate 1
- PHP PHP 5.0.0 candidate 2
- PHP PHP 5.0.0 candidate 3
- PHP PHP 5.0.1
- PHP PHP 5.0.2
- PHP PHP 5.0.3
- PHP PHP 5.0.4
- PHP PHP 5.0.5
- PHP PHP 5.1.0
- PHP PHP 5.1.1
- PHP PHP 5.1.2
- PHP PHP 5.1.3
- PHP PHP 5.1.3-RC1
- PHP PHP 5.1.4
- PHP PHP 5.1.5
- PHP PHP 5.1.6
- PHP PHP 5.2
- PHP PHP 5.2.1
- PHP PHP 5.2.2
- RedHat Fedora Core7
- S.u.S.E. Linux 10.0 ppc
- S.u.S.E. Linux 10.0 x86
- S.u.S.E. Linux 10.0 x86-64
- S.u.S.E. Linux 10.1 ppc
- S.u.S.E. Linux 10.1 x86
- S.u.S.E. Linux 10.1 x86-64
- S.u.S.E. Linux Enterprise Server 10.SP1
- S.u.S.E. Linux Enterprise Server 8
- S.u.S.E. Linux Enterprise Server 9
- S.u.S.E. Novell Linux POS 9
- S.u.S.E. Open-Enterprise-Server
- S.u.S.E. SLE SDK 10.SP1
- S.u.S.E. SUSE LINUX Retail Solution 8.0.0
- S.u.S.E. SuSE Linux Openexchange Server 4.0.0
- S.u.S.E. SuSE Linux School Server for i386
- S.u.S.E. SuSE Linux Standard Server 8.0.0
- S.u.S.E. UnitedLinux 1.0.0
- S.u.S.E. openSUSE 10.2
- Trustix Operating System Enterprise Server 2.0
- Trustix Secure Linux 2.0.0
- Trustix Secure Linux 2.2.0
- Trustix Secure Linux 3.0.0
- Trustix Secure Linux 3.0.5
- Ubuntu Ubuntu Linux 6.06 LTS amd64
- Ubuntu Ubuntu Linux 6.06 LTS i386
- Ubuntu Ubuntu Linux 6.06 LTS powerpc
- Ubuntu Ubuntu Linux 6.06 LTS sparc
- Ubuntu Ubuntu Linux 6.10 amd64
- Ubuntu Ubuntu Linux 6.10 i386
- Ubuntu Ubuntu Linux 6.10 powerpc
- Ubuntu Ubuntu Linux 6.10 sparc
- Ubuntu Ubuntu Linux 7.04 amd64
- Ubuntu Ubuntu Linux 7.04 i386
- Ubuntu Ubuntu Linux 7.04 powerpc
- Ubuntu Ubuntu Linux 7.04 sparc
References:
- Bugs Dot Php Dot Net At Chsc Dot Dk: #41492 [NEW]: open_basedir bypass via readfile()
- PHP: PHP 5 ChangeLog
- PHP: PHP 5.2.3 Release Announcement
- SUSE: SUSE Security Announcement SUSE-SA:2007:044
Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.