dh memoranda

徒然なるままに日暮らしブログに向かいて...

Movable Type クロスサイトスクリプティング脆弱性?

いくつかのサイトで話題になっていた、Movable Type のクロスサイトスクリプティング脆弱性についてですが、本家に聞いてみました。2.6 以降では、Sanitize コードを組みこんであって、デフォルトではオンになっているので、これをいじらなければ大丈夫、とのことです。これは、「Allow HTML in Comments」がOnでも有効になっています。Sanitize のオプションがデフォルト通りであれば、タグは一部しか通しません。

Allow HTML in Comments を Off にするか、On にするときは、Sanitize の設定をきちんとする、というようにお願いします。

もし、2.5x とか以前のバージョンを使っているのであれば、2.63 にアップデートしてください、とのことです。

本家からのメールによると、Bugtraq に次のように送ったそうです。

Regarding the potential XSS vulnerability discussed in the original message, Movable Type was updated to prevent this possible exploit on February 13, with the release of version 2.6 of the sofware. In addition, all of our users were alerted to the potential of a security issue and urged to update to the newer version. Our current version is 2.63, downloadable at http://www.movabletype.org, and it prevents this exploit by default.

mt.cfg の中にこのように書いてあります。

By default, Movable Type cleans up ("sanitizes") any data submitted by visitors to your site. This is done to remove any code (HTML or otherwise) that could compromise the security of your site. The sanitization code works by only allowing certain HTML tags--any other tags, and all processing instructions (PHP, for example) are stripped. The GlobalSanitizeSpec setting, then, specifies the tags and attributes that are allowed. The default setting is "a href,b,br/,p,strong,em,ul,li,blockquote".

詳しく知りたい方は、Bugtraq の議論 を見たらいいと思います。