PHP.tempnam.Directory.Traversal

description-logoDescription

PHP is a general-purpose server-side scripting language originally designed for Web development to produce dynamic Web pages, which is among one of the first developed server-side scripting languages to be embedded into an HTML source document, rather than calling an external file to process data. Ultimately, the code is interpreted by a Web server with a PHP processor module which generates the resulting Web page. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications.
Directory traversal vulnerability in file.c in PHP 4.4.2 and 5.1.2 allows local users to bypass open_basedir restrictions and allows remote attackers to create files in arbitrary directories via the tempnam function.

affected-products-logoAffected Products

PHP 5 earlier than 5.1.2
PHP 4 earlier than 4.4.2

Impact logoImpact

The vulnerability could allow local users to bypass open_basedir restrictions and allows remote attackers to create files in arbitrary directories via the tempnam function.

recomended-action-logoRecommended Actions

Upgrade to PHP 5.1.2/4.4.2 or later.
For FortiGate users, please turn on the following IPS signature that can prevent the exploitation of the vulnerabilities:
PHP.tempnam.Directory.Traversal

Coverage

IPS (Regular DB)
IPS (Extended DB)