-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Advisory: Multiple Cross Site Scripting vulnerabilities in phpMyFAQ Name: TKADV2005-11-004 Revision: 1.0 Release Date: 2005/11/19 Last Modified: 2005/11/19 Author: Tobias Klein (tk at trapkit.de) Affected Software: phpMyFAQ (all versions <= phpMyFAQ 1.5.3) Risk: Critical ( ) High (x) Medium ( ) Low ( ) Vendor URL: http://www.phpmyfaq.de/ Vendor Status: Vendor has released an updated version ========= Overview: ========= phpMyFAQ is a multilingual, completely database-driven FAQ-system. Version 1.5.3 and prior contain multiple persistent Cross Site Scripting vulnerabilities. ====================== Vulnerability details: ====================== All the following vulnerabilities are exploitable by an anonymous user. Because of that all these issues are rated with a high probability of occurrence. For a description of the calculation of the resulting threat of a vulnerability see reference [3]. All vulnerabilities are exploitable, no matter if magic_quotes_gpc is turned on or off. [1] Cross Site Scripting Possible damage: High Probability of occurrence: High Resulting threat: High HTTP method: POST XSS type: persistent Vulnerability description: The "username" parameter is prone to cross-site scripting attacks. This could permit an attacker to embed a malicious link into the context of the web application that includes hostile client-side script code or HTML. If the appropriate site within the application is visited, the attacker-supplied code is rendered in the browser of the user who visits the site. No further user interaction is needed. URL with vulnerable POST form: [path_to_phpmyfaq]/faq/index.php?sid=2&lang=en&action=add Vulnerable POST Parameter: username Proof of Concept (POST request): POST [path_to_phpmyfaq]/faq/index.php?sid=2&lang=en&action=save HTTP/1.1 Parameter | Value ------------------------------------------------------ username | " onmouseover="alert(document.cookie); usermail | test rubrik%5B%5D | 1 thema | test content | test keywords | test contentlink | http:// submit | submit ------------------------------------------------------ If an administrator now wants to approve this new record within the admin interface and moves the mouse pointer over the "Author" form- field, the injected script code gets executed. [2] Cross Site Scripting Possible damage: High Probability of occurrence: High Resulting threat: High HTTP method: POST XSS type: persistent Vulnerability description: The "usermail" parameter is prone to cross-site scripting attacks. This could permit an attacker to embed a malicious link into the context of the web application that includes hostile client-side script code or HTML. If the appropriate site within the application is visited, the attacker-supplied code is rendered in the browser of the user who visits the site. No further user interaction is needed. URL with vulnerable POST form: [path_to_phpmyfaq]/faq/index.php?sid=2&lang=en&action=add Vulnerable POST Parameter: usermail Proof of Concept (POST request): POST [path_to_phpmyfaq]/faq/index.php?sid=2&lang=en&action=save HTTP/1.1 Parameter | Value ------------------------------------------------------ username | test usermail | " onmouseover="alert(document.cookie); rubrik%5B%5D | 1 thema | test content | test keywords | test contentlink | http:// submit | submit ------------------------------------------------------ If an administrator now wants to approve this new record within the admin interface and moves the mouse pointer over the "email adress" form-field, the injected script code gets executed. [3] Cross Site Scripting Possible damage: High Probability of occurrence: High Resulting threat: High HTTP method: POST XSS type: persistent Vulnerability description: The "thema" parameter is prone to cross-site scripting attacks. This could permit an attacker to embed a malicious link into the context of the web application that includes hostile client-side script code or HTML. If the appropriate site within the application is visited, the attacker-supplied code is rendered in the browser of the user who visits the site. No further user interaction is needed. URL with vulnerable POST form: [path_to_phpmyfaq]/faq/index.php?sid=2&lang=en&action=add Vulnerable POST Parameter: thema Proof of Concept (POST request): POST [path_to_phpmyfaq]/faq/index.php?sid=2&lang=en&action=save HTTP/1.1 Parameter | Value ------------------------------------------------------ username | test usermail | test rubrik%5B%5D | 1 thema | ' : ''}; alert(document.cookie); // content | test keywords | test contentlink | http:// submit | submit ------------------------------------------------------ This special PoC code only works, if it is the last entry in the record list. If an administrator now wants to approve this new record within the admin interface and clicks on the appropriate topic, the injected script code gets executed. ========= Solution: ========= Upgrade to phpMyFAQ 1.5.4 or newer. http://www.phpmyfaq.de/download.php ======== History: ======== 2005/11/10 - Vendor notified 2005/11/11 - Vendor response 2005/11/18 - Release of new phpMyFAQ version 2005/11/19 - Public release ======== Credits: ======== Vulnerabilities found and advisory written by Tobias Klein. =========== References: =========== [1] http://www.phpmyfaq.net/advisory_2005-11-18.php [2] http://www.trapkit.de/advisories/TKADV2005-11-004.txt [3] http://www.trapkit.de/advisories/TKADVcortav.txt ======== Changes: ======== Revision 0.1 - Initial draft release to the vendor Revision 1.0 - Public release =========== Disclaimer: =========== The information within this advisory may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are no warranties, implied or express, with regard to this information. In no event shall the author be liable for any direct or indirect damages whatsoever arising out of or in connection with the use or spread of this information. Any use of this information is at the user's own risk. The copyright for any material created by the author is reserved. Any duplication of codes or texts provided here in electronic or printed publications is not permitted without the author's agreement. ================== PGP Signature Key: ================== http://www.trapkit.de/advisories/tk-advisories-signature-key.asc Copyright 2005 Tobias Klein. All rights reserved. -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQ390O5F8YHACG4RBEQLJwwCgySpKE8hBtLs54tV2QhGGZNgyBeYAoJbg I3G3GmHU9+pLZ0F6USmRolcK =CSfc -----END PGP SIGNATURE-----