バージョンアップがあったが、この脆弱性への対応は含まれていないようだ。
徳丸さんのサイトで公開されていたので対策してみました。
とりあえず、下記のコード変更をすぐに適用するか、mod_tags_similarを無効にしてください。対象バージョンは、mod_tags_similarが有効なおそらく3.1以降のどれも該当すると思います。(mod_tags_similarがそのバージョンからのようなので)
※また、この変更はもちろん正式なものではないので次のバージョンアップの情報に注意しましょう。
変更するファイルは、ROOT/modules/mod_tags_similar/helper.phpです。
元のコード
$id = (array) $app->input->getObject('id');
// Strip off any slug data.
foreach ($id as $id)
{
if (substr_count($id, ':') > 0)
{
$idexplode = explode(':', $id);
$id = $idexplode[0];
}
}
// For now assume com_tags and com_users do not have tags.
// This module does not apply to list views in general at this point.
if ($option != 'com_tags' && $view != 'category' && $option != 'com_users')
変更後のコード
$id = (array) $app->input->getObject('id');
// Strip off any slug data.
foreach ($id as $id)
{
if (substr_count($id, ':') > 0)
{
$idexplode = explode(':', $id);
$id = $idexplode[0];
}
}
$id = (int)$id;
// For now assume com_tags and com_users do not have tags.
// This module does not apply to list views in general at this point.
if ($id > 0 && $option != 'com_tags' && $view != 'category' && $option != 'com_users')
$idを明示的にintにしている部分と、$idが0以下なら何もしないようにしています。
また、合わせて徳丸さんが以下のように書かれていたが、どうか。