Exploit-DB #24901
Description: MailOrderWorks 5.907 - Multiple Vulnerabilities
Type: webapps
Platform: windows
Date: 2013-03-29
Author: Vulnerability-Lab

Exploit:
Title:
======
MailOrderWorks v5.907 - Multiple Web Vulnerabilities


Date:
=====
2013-01-02


References:
===========
http://www.vulnerability-lab.com/get_content.php?id=798


VL-ID:
=====
796


Common Vulnerability Scoring System:
====================================
4.5


Introduction:
=============
Mail order management and stock control is easy with MailOrderWorks. MailOrderWorks (aka MOW) is an easy to use mail order 
software and stock control system that supports multiple users, but is also ideal for single person companies too. Our software 
allows you and your staff to access the same information, at the same time, from anywhere - even if you`re not in the same office 
or building. It`s affordable, easy to use, allows integration and is easily expandable for more users. It`s free to try too.

(Copy of the Vendor Homepage: http://www.mailorderworks.co.uk/index.php )


Abstract:
=========
The Vulnerability-Laboratory Research Team discovered multiple web vulnerabilities in MailOrderWorks v5.907, Mail order management application.



Report-Timeline:
================
2012-12-26:	Public Disclosure


Status:
========
Published


Affected Products:
==================
2Dmedia
Product: MailOrderWorks 5.907


Exploitation-Technique:
=======================
Remote


Severity:
=========
Medium


Details:
========
Multiple persistent web vulnerabilities are detected in the MailOrderWorks v5.907, Mail order management application.
The vulnerability allows an attacker to inject own malicious script code in the vulnerable modules on application side (persistent).

The vulnerabilities mainly exist in the create document/print module. The module doesn`t validate the file context when processing to create. 
For example, if we are creating a products summary, the print module(vulnerable) doesn`t check the products  titles, and creates the document 
with the injected malicious code inside.

1.1
The first vulnerability is located in the `dispatch order` module. The attacker can create an order by injecting the malicious code in the 
vulnerable customer parameters which are firstname, lastname, custom A1 and custom A2. For the malicious code to get executed, the target user 
should go to `dispatch order` module `Open Batch screen`  and then click `start`. The output file executes the malicious script code while 
creating the malicious order via add.

1.2
The second vulnerability is located in the `reports and exports` module. The attacker can create an order injecting the vulnerable parameters 
in it. The malicious code will be executed when the user choose the orders and create a report about them. The vulnerability also can be 
executed from creating a report about the products. The attacker can create a product with injecting malicious code in the vulnerable 
parameters which are SKU, Title and Group. When the user create a report about the products, the malicious code will be executed out of the 
context from the report file 

1.3
The persistent input validation vulnerability is located in the `Create/View issue` in the show/add orders modules. The attacker can 
inject malicious codes in different vulnerable parameters which are Reason/fault, Resolution, Issue Notes and Order notes. Whenever the user 
clicks on `print issue document` a file will be generated and it includes the malicious codes where it gets executed.

1.4
The final persistent cross-site scripting vulnerability is ver critical because it gets injected in every file that is being generated from 
the MailOrderWorld(MOW). The vulnerability is located in the settings of the application where the attacker can inject a malicious code inside 
the company profiles in the vulnerable fields which are, Company Name and Address. Whenever a user generates any page, the malicious code will 
be executed because the fields: `company name` and `company address` are included in every page that is generated by MOW.

The vulnerability can be exploited with privileged application user account and low or medium required user interaction.
Successful exploitation of the vulnerability result in persistent/non-persistent session hijacking, persistent/non-persistent 
phishing, external redirect, external malware loads and persistent/non-persistent vulnerable module context manipulation.


Vulnerable Service(s):
				[+] MailOrderWorks (5.907)

Vulnerable Section(s):
				[+] New Order
				[+] Add new Product
				[+] View Orders
				[+] Settings

Vulnerable Module(s):
				[+] Customer
				[+] Add new Product
				[+] View Orders => Done => Create/View Issue 
				[+] Company Settings

Vulnerable Parameter(s):
				[+] [Name] - [Mobile/Work] - [Custom A1] - [Custom A2] - [Custom B] - [Email] 
				[+] [SKU] - [Title] - [Group]
				[+] [Reason/fault] - [Resolution] - [Issue Notes] - [Order notes]
				[+] [Company name] - [Address] - [Document Title] - [Details/Message]

Affected Module(s):
				[+] dispatch order > Open batch screen > Start
				[+] Reports and Exports	 > [Products] - [Dispatch]
				[+] View Orders > Done > Create/View Issue > Print issue Document
				[+] Any document Generated by MOW



Proof of Concept:
=================
The persistent input validation web vulnerabilities can be exploited by remote attackers with low or medium required user interaction and 
low privileged application user account. For demonstration or reproduce ...

#1

Vulnerable Module(s):  	New Order => [Name] - [Mobile/Work] - [Custom A1] - [Custom A2] - [Custom B] - [Email] 
Affected Module(s): 	dispatch order => open batch screen => start

Code Review:
	<div id="container">
		<div id="tl">
			<h1>Sales Invoice</h1>
			<dl style="padding-left: 12px; padding-top: 8px;">
				<dt>Invoice No.</dt>
				<dd>1004</dd>
				<dt>Order Date</dt>
				<dd>12/24/2012</dd>
				<dt>Custom B1</dt>
				<dd>[PERSISTENT INJECTED SCRIPT CODE!]</dd