============================================= INTERNET SECURITY AUDITORS ALERT 2009-004 - Original release date: December 3rd, 2008 - Last revised: March 10th, 2009 - Discovered by: Juan Galiana Lara - Severity: 6.3/10 (CVSS scored) ============================================= I. VULNERABILITY ------------------------- WordPress MU < 2.7 'Host' HTTP Header Cross Site Scripting (XSS) Vulnerability II. BACKGROUND ------------------------- WordPress MU, or multi-user, allows to run unlimited blogs with a single install of wordpress. It is most famously used for WordPress.com where it serves tens of millions of hits on hundreds of thousands of blogs each day. Also is used in many other sites like Harvard University and Le Monde. III. DESCRIPTION ------------------------- WordPress MU prior to version 2.7 fails to sanitize the Host header correctly in choose_primary_blog function and is therefore prune to XSS attacks. Web Sites running in a name based virtual hosting setup are not affected while they are not the default virtual host. IV. PROOF OF CONCEPT ------------------------- The snippet of vulnerable code: In wp-includes/wpmu-functions.php, concretly in the function choose_primary_blog: 1830 function choose_primary_blog() { 1831 global $current_user; 1832 ?> 1833
1836 | 1837 ID ); 1839 if( count( $all_blogs ) > 1 ) { 1840 $primary_blog = get_usermeta($current_user->ID, 'primary_blog'); 1841 ?> 1842 1847 1852 | 1853
---|