PHP 5.1.2の脆弱性

Computer, Security 4月 27, 2006 #PHP, #脆弱性
(Last Updated On: 2018年8月13日)

A cross-site scripting (XSS) vulnerability in phpinfo (info.c) in PHP
<= 5.1.2 allows remote attackers to inject arbitrary web script or HTML
via long array variables, including (1) a large number of dimensions
or (2) long values, which prevents HTML tags from being removed.
(CVE-2006-0996)

Directory traversal vulnerability in file.c in PHP <= 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. (CVE-2006-1494)

The copy function in file.c in PHP <= 5.1.2 allows local users to
bypass safe mode and read arbitrary files via a source argument
containing a compress.zlib:// URI. (CVE-2006-1608)

Mandriva Linux Security Advisoryによると現行リリースのPHP 5.1.2,4.4.2にも含まれる脆弱性を修正したPHPパッケージをリリースしましたね。重要な修正ではないので「適切」にシステムを構築・管理しているPHPユーザは気にする必要はありません。

phpinfo関数を一般に公開するのは絶対に止めた方が良いです。基本的にphpinfo関数の出力はデバッグ用の情報です。セキュアなシステムではデバッグ情報を一般に公開する事はありません。開発時以外はシステムや言語のエラー情報を出力しないのと同じです。

open_basedirは「フェイルセーフ機能」であるため、これに頼った設計を行うべきではありません。Perlなどでtaintモードを信頼するのと変わりません。

# 言い古されてはいますが、セキュリティ対策は繰り返し言い続ける事が重要ですから。

投稿者: yohgaki