Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2007.0030 -- [Win][UNIX/Linux] WordPress multiple vulnerabilities 16 January 2007 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: WordPress 2.0.5 and prior Publisher: Hardened-PHP Project Operating System: UNIX variants (UNIX, Linux, OSX) Windows Impact: Execute Arbitrary Code/Commands Cross-site Scripting Access: Remote/Unauthenticated Original Bulletin: http://www.hardened-php.net/advisory_012007.140.html http://www.hardened-php.net/advisory_022007.141.html Comment: Note that this bulletin contains two advisories regarding WordPress. Upgrading to WordPress 2.0.6 fixes both issues. - --------------------------BEGIN INCLUDED TEXT-------------------- - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hardened-PHP Project www.hardened-php.net -= Security Advisory =- Advisory: WordPress Trackback Charset Decoding SQL Injection Vulnerability Release Date: 2007/01/05 Last Modified: 2007/01/05 Author: Stefan Esser [sesser@hardened-php.net] Application: WordPress <= 2.0.5 Severity: The support of trackbacks in different charsets can be used to bypass WordPress's SQL injection protection. This might result in a compromise of the admin account and the execution of arbitrary PHP code on the server Risk: Critical Vendor Status: Vendor has released WordPress 2.0.6 which fixes this issue References: http://www.hardened-php.net/advisory_022007.141.html Overview: Quote from http://www.wordpress.org "WordPress was born out of a desire for an elegant, well- architectured personal publishing system built on PHP and MySQL and licensed under the GPL. It is the official successor of b2/cafelog. WordPress is fresh software, but its roots and development go back to 2001. It is a mature and stable product. We hope by focusing on user experience and web standards we can create a tool different from anything else out there." While testing WordPress it was discovered that WordPress supports trackbacks in different charsets when PHP's mbstring extension is installed. This feature can be abused to bypass WordPress's SQL parameter escaping which leads to an SQL injection vulnerability that can result in a compromise of the admin account and end in a server compromise. Details: WordPress supports decoding trackbacks with different charsets when PHP's mbstring extension is activated. Because the decoding happens after the database escaping is performed choosing the right charset for the input data allows bypassing the protection against SQL injection. For the demonstration exploit that was shared with the WordPress developers the UTF-7 charset was chosen, because it is the easiest to work with. Other multibyte charsets that for example allow multibyte sequences ending in '\' can also be used. The exploit first checks if the mbstring extension is loaded by sending only an UTF-7 encoded '0' in the title field. Because only a decoded '0' will pass the empty() check this will trigger two different error situations depending on mbstring availability. The exploit continues with injecting bogus SQL commands into the SQL query which will result in WordPress giving out detailed information about the failed query. This error message is used to determine the configure database table prefix, which is needed for the correct exploitation. In the next step a harmless looking bogus comment is injected into the comment table with a timestamp in the future. This is done to stop WordPress from sending notification emails to the admin during the password hash retrieval. The rest of the exploit is a simple UNION SELECT injection that determines password hashes by issuing a request for every bit of the hash (128 bits) and checking which error message is returned. With the reconstructed password hash it is possible to create a WordPress login cookie that can be used to become admin. As admin it is possible to edit (overwrite) all files within the blog directory that are writeable. This can be used to inject arbitrary PHP code in most installations. There exists a protection that denies loading the wp-config.php file into the file editor, but it can be tricked by directly sending a POST request that only saves the files. The wp-config.php file is usually left writeable after the installation has finished. Proof of Concept: The Hardened-PHP Project is not going to release a proof of concept exploit for this vulnerability. Disclosure Timeline: 29. December 2006 - Notified security@wordpress.org 05. January 2007 - WordPress 2.0.6 release 05. January 2007 - Public Disclosure Recommendation: We strongly recommend to upgrade to WordPress 2.0.6 which also fixes several other security vulnerabilities not covered by this advisory. http://wordpress.org/download/ GPG-Key: http://www.hardened-php.net/hardened-php-signature-key.asc pub 1024D/0A864AA1 2004-04-17 Hardened-PHP Signature Key Key fingerprint = 066F A6D0 E57E 9936 9082 7E52 4439 14CC 0A86 4AA1 Copyright 2007 Stefan Esser. All rights reserved. - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFFnnfrRDkUzAqGSqERArBQAJ9KW5+1EwwTozgtHQJgZR0XMwLLygCglC4n 5/ova+EUrueU++pt6ohD5q0= =JqSS - -----END PGP SIGNATURE----- - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hardened-PHP Project www.hardened-php.net -= Security Advisory =- Advisory: WordPress CSRF Protection XSS Vulnerability Release Date: 2007/01/05 Last Modified: 2007/01/05 Author: Stefan Esser [sesser@hardened-php.net] Application: WordPress <= 2.0.5 Severity: The CSRF protection of WordPress's administration interface is vulnerable to an XSS vulnerability which might result in a compromise of the admin account and the execution of arbitrary PHP code on the server Risk: Critical Vendor Status: Vendor has released WordPress 2.0.6 which fixes this issue References: http://www.hardened-php.net/advisory_012007.140.html Overview: Quote from http://www.wordpress.org "WordPress was born out of a desire for an elegant, well- architectured personal publishing system built on PHP and MySQL and licensed under the GPL. It is the official successor of b2/cafelog. WordPress is fresh software, but its roots and development go back to 2001. It is a mature and stable product. We hope by focusing on user experience and web standards we can create a tool different from anything else out there." While testing WordPress it was discovered that there is a XSS vulnerability in the CSRF protection of WordPress's administration interface. This might result in a compromise of the admin account and might result in the execution of arbitrary PHP code. Details: The administration interface within WordPress comes with a token based CSRF protection. When a request is received with an invalid token it is not discarded like in many similar applications, but a warning screen is returned that asks the admin to verify the action by clicking on a link (that contains a valid token). Unfortunately there was a bug in the way the request information (URL variables) was put into the new link. Due to this fault it was possible to break out of the HTML string context by embedding quotes and HTML tags into the names of URL variables. Due to this is is possible to launch XSS attacks against admin users currently logged into their WordPress and perform all possible administrative actions (or simply steal the login cookie). Depending on the file permissions on the server (for example a writeable wp-config.php or template file) this can also be exploited to execute arbitrary PHP code. Proof of Concept: The Hardened-PHP Project is not going to release a proof of concept exploit for this vulnerability. Disclosure Timeline: 14. November 2006 - Notified security@wordpress.org 05. January 2007 - WordPress 2.0.6 release 05. January 2007 - Public Disclosure Recommendation: We strongly recommend to upgrade to WordPress 2.0.6 which also fixes several other security vulnerabilities not covered by this advisory. http://wordpress.org/download/ GPG-Key: http://www.hardened-php.net/hardened-php-signature-key.asc pub 1024D/0A864AA1 2004-04-17 Hardened-PHP Signature Key Key fingerprint = 066F A6D0 E57E 9936 9082 7E52 4439 14CC 0A86 4AA1 Copyright 2007 Stefan Esser. All rights reserved. - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFFnnflRDkUzAqGSqERAj0FAJ90O0DfF6ETzPOepDmSmERA34OoqwCeIgSP hGSWX194r0vFm40tMaUc4bQ= =R3/p - -----END PGP SIGNATURE----- - --------------------------END INCLUDED TEXT-------------------- You have received this e-mail bulletin as a result of your organisation's registration with AusCERT. The mailing list you are subscribed to is maintained within your organisation, so if you do not wish to continue receiving these bulletins you should contact your local IT manager. If you do not know who that is, please send an email to auscert@auscert.org.au and we will forward your request to the appropriate person. NOTE: Third Party Rights This security bulletin is provided as a service to AusCERT's members. As AusCERT did not write the document quoted above, AusCERT has had no control over its content. The decision to follow or act on information or advice contained in this security bulletin is the responsibility of each user or organisation, and should be considered in accordance with your organisation's site policies and procedures. AusCERT takes no responsibility for consequences which may arise from following or acting on information or advice contained in this security bulletin. NOTE: This is only the original release of the security bulletin. It may not be updated when updates to the original are made. If downloading at a later date, it is recommended that the bulletin is retrieved directly from the author's website to ensure that the information is still current. Contact information for the authors of the original document is included in the Security Bulletin above. If you have any questions or need further information, please contact them directly. Previous advisories and external security bulletins can be retrieved from: http://www.auscert.org.au/render.html?cid=1980 If you believe that your computer system has been compromised or attacked in any way, we encourage you to let us know by completing the secure National IT Incident Reporting Form at: http://www.auscert.org.au/render.html?it=3192 =========================================================================== Australian Computer Emergency Response Team The University of Queensland Brisbane Qld 4072 Internet Email: auscert@auscert.org.au Facsimile: (07) 3365 7031 Telephone: (07) 3365 4417 (International: +61 7 3365 4417) AusCERT personnel answer during Queensland business hours which are GMT+10:00 (AEST). On call after hours for member emergencies only. =========================================================================== -----BEGIN PGP SIGNATURE----- Comment: http://www.auscert.org.au/render.html?it=1967 iQCVAwUBRaw/8yh9+71yA2DNAQL33gP+PY009o7dZqyeXQ0xJEAr5y8LMnckghvz sQI7WGIMr+a8VNpMzxALV+DIFSKnlRQKR2SUXjrjGI51nzVNDZlu39eOeUlGRJ27 KVW3tD7KtF05jZNzyckeLkri691CkePSEguskLdjpSy3v/VhFRucVONK1eLGGVu4 P3S3mMrT/F4= =9IhY -----END PGP SIGNATURE-----