Document Title: =============== AEF CMS v1.0.9 - (PM) Persistent Cross Site Scripting Vulnerability References (Source): ==================== https://www.vulnerability-lab.com/get_content.php?id=2123 Release Date: ============= 2018-02-18 Vulnerability Laboratory ID (VL-ID): ==================================== 2123 Common Vulnerability Scoring System: ==================================== 4.4 Vulnerability Class: ==================== Cross Site Scripting - Persistent Current Estimated Price: ======================== 1.000€ - 2.000€ Product & Service Introduction: =============================== AEFs full name is Advanced Electron Forum. This bulletin board software is free software. It is written in PHP and MySQL. AEF has a very simple and easy to use Administration Panel and installing this software is a piece of cake! You can install new themes, customize themes the way you want. The User Control Panel has a simple yet beautiful interface where users can set their preferences for the board. This Bulletin board or forum software has all the general features that a forum software should have. (Copy of the Homepage: https://www.softaculous.com/apps/forums/AEF & http://www.anelectron.com/) Abstract Advisory Information: ============================== The vulnerability laboratory core research team discovered a persistent web vulnerability in the official Advanced Electron Forum v1.0.9 CMS. Vulnerability Disclosure Timeline: ================================== 2018-02-20: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Exploitation Technique: ======================= Remote Severity Level: =============== Medium Authentication Type: ==================== Restricted authentication (user/moderator) - User privileges User Interaction: ================= Low User Interaction Disclosure Type: ================ Independent Security Research Technical Details & Description: ================================ A persistent cross site scripting vulnerability has been discovered in the official Advanced Electron Forums v1.0.9 Content Management System. The vulnerability allows remote attackers to inject own malicious script code with persistent attack vector to the application-side of the service. The persistent cross site vulnerability is located in the `FTP Link` element of the `Private Message` module. The editor of the private message module allows to insert links without sanitizing the content. Thus allows remote attackers to inject malicious script code payloads as private message to compromise user credentials or to persistent manipulate the affected modules context. The injection point is the editor ftp link element and the execution point occurs in the message body context on arrival. The request method to inject is post with restricted user privileges and the attack vector is located on the application-side. Successful exploitation of the vulnerability results in session hijacking, persistent phishing attacks, persistent external redirects to malicious source and persistent manipulation of affected or connected application modules. Request Method(s): [+] POST Vulnerable Module(s): [+] Private Messages Vulnerable Input(s): [+] Ftp Link (Editor Element) Proof of Concept (PoC): ======================= The cross site scripting web vulnerability can be exploited by low privileged user accounts with low user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability ... 1. Open the web-application and login as user 2. Move to the private message module 3. Open up the editor by composing a message 4. add some short text, save the entry as draft 5. Open the draft and insert a ftp link with a script code payload 6. Save the entry and deliver the message to another test user Note: The message only needs to be watched to execute on arrival 7. The test user opens the private message module and the persistent script code executes in the message body context 8. Successful reproduce of the persistent vulnerability! PoC: Payload (Ftplink) %0D%0A%0D%0A or %0D%0A%0D%0A%0D%0A%0D%0A+ PoC: Vulnerable Source <textarea name="pmbody" rows="13" cols="65" id="pmbody" onchange="storeCaret(this);" onkeyup="storeCaret(this);" onclick="storeCaret(this);" onselect="storeCaret(this);" style="visibility: visible; width: 487px; height: 226px;">This+is+a+private+test+message+with+payload+in+the+ftp+link%0D%0A%0D%0A</textarea> PoC: Session Logs (Send Private Message) Status: 200[OK] POST https://aeforums.localhost:8000/AEF/index.php?act=usercp&ucpact=sendsaved&pmid=1 Mime Type[text/html] Request Header: Host[aeforums.localhost:8000] User-Agent[Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Content-Type[application/x-www-form-urlencoded] Content-Length[174] Referer[https://aeforums.localhost:8000/AEF/index.php?act=usercp&ucpact=sendsaved&pmid=1] Cookie[AEFCookies1526[aefsid]=jmik0sqtslneqffjl537i931brqh3tzr; AEFCookies8381[aefsid]=x1m0rs9lhcl6hl3tbq7qbdh9jn0xsnsf] Connection[keep-alive] Upgrade-Insecure-Requests[1] POST-Daten: pmrecipients[admin] pmsubject[test] pmbody[This+is+a+private+test+message+with+payload+in+the+ftp+link%0D%0A%0D%0A] postcode[yerudyyk4joz8ea5] pmsaveinsentitems[on] sendpm[Send+PM] Response Header: Server[Apache] X-Powered-By[PHP/5.4.45] Content-Length[217] Content-Type[text/html; charset=ISO-8859-1] - Status: 200[OK] GET https://aeforums.localhost:8000/AEF/evil.source Mime Type[text/html] Request Header: Host[aeforums.localhost:8000] User-Agent[Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Referer[https://aeforums.localhost:8000/AEF/index.php?act=usercp&ucpact=sendsaved&pmid=1] Cookie[AEFCookies1526[aefsid]=jmik0sqtslneqffjl537i931brqh3tzr; AEFCookies8381[aefsid]=x1m0rs9lhcl6hl3tbq7qbdh9jn0xsnsf] Connection[keep-alive] Upgrade-Insecure-Requests[1] Response Header: Server[Apache] Accept-Ranges[bytes] Content-Length[431] Content-Type[text/html; charset=UTF-8] Reference(s): https://aeforums.localhost:8000/AEF/ https://aeforums.localhost:8000/AEF/index.php Solution - Fix & Patch: ======================= The security vulnerability can be patched by a sanitize of the ftp link element input field in the private message module. Parse in the editor the output location for the link to prevent the execution point of the issue. Security Risk: ============== The security risk of the persistent cross site scripting web vulnerability in the open-source web-application is estimated as medium (cvss 4.4). Credits & Authors: ================== Benjamin K.M. [research@xxxxxxxxxxxxxxxxxxxxx] - https://www.vulnerability-lab.com/show.php?user=Benjamin+K.M. Disclaimer & Information: ========================= The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability Labs or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability mainly for incidental or consequential damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any licenses, policies, deface websites, hack into databases or trade with stolen data. We have no need for criminal activities or membership requests. We do not publish advisories or vulnerabilities of religious-, militant- and racist- hacker/analyst/researcher groups or individuals. We do not publish trade researcher mails, phone numbers, conversations or anything else to journalists, investigative authorities or private individuals. Domains: www.vulnerability-lab.com - www.vulnerability-db.com - www.evolution-sec.com Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register.php Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php Social: twitter.com/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab Any modified copy or reproduction, including partially usages, of this file, resources or information requires authorization from Vulnerability Laboratory. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list, modify, use or edit our material contact (admin@) to get an ask permission. Copyright © 2018 | Vulnerability Laboratory - [Evolution Security GmbH]™ -- VULNERABILITY LABORATORY - RESEARCH TEAM SERVICE: www.vulnerability-lab.com