Информация по данной уязвимости уже пролетела по просторам Сети, но может кто еще не в курсе (или для тех, кто не следит за безопасностью своего блога) — товарищем Darshit Ashara была найдена XSS в Wordpress (post-template.php), ничего сверхинтересного, но безопасность на первом месте.
Пока официального патча нет, новой версии нет, под катом временное решение.
Файл post-template.php
Добавляем htmlentities() к указанным строчкам
function the_title($before = '', $after = '', $echo = true) {
$title = get_the_title();
if ( strlen($title) == 0 )
return;
$title = $before . $title . $after;
if ( $echo )
echo htmlentities($title);
else
return htmlentities($title);
}
function the_title_attribute( $args = '' ) {
$title = get_the_title();
if ( strlen($title) == 0 )
return;
$defaults = array('before' => '', 'after' => '', 'echo' => true);
$r = wp_parse_args($args, $defaults);
extract( $r, EXTR_SKIP );
$title = $before . $title . $after;
$title = esc_attr(strip_tags($title));
if ( $echo )
echo htmlentities($title);
else
return htmlentities($title);
}
function get_the_title( $id = 0 ) {
$post = &get_post($id);
$title = isset($post->post_title) ? $post->post_title : '';
$id = isset($post->ID) ? $post->ID : (int) $id;
if ( !is_admin() ) {
if ( !empty($post->post_password) ) {
$protected_title_format = apply_filters('protected_title_format', __('Protected: %s'));
$title = sprintf($protected_title_format, $title);
} else if ( isset($post->post_status) && 'private' == $post->post_status ) {
$private_title_format = apply_filters('private_title_format', __('Private: %s'));
$title = sprintf($private_title_format, $title);
}
}
return htmlentities(apply_filters( 'the_title', $title, $id ));
}
Для эксплуатации нужны права автора.