AppFish Offline Coder 2.2 Persistent Script Insertion

Type packetstorm
Reporter Benjamin Kunz Mejri
Modified 2014-04-10T00:00:00


                                            `Document Title:  
AppFish Offline Coder v2.2 iOS - Persistent Software Vulnerability  
References (Source):  
Release Date:  
Vulnerability Laboratory ID (VL-ID):  
Common Vulnerability Scoring System:  
Product & Service Introduction:  
Offline coder allows you to enter HTML, CSS, Javascript and PHP code and have the output generated immediately.   
You can code completely offline, with the exception of compiling PHP, which requires an internet connection.   
- Instant offline processing of HTML, CSS and Javascript within the app.  
- Instant processing of PHP code, with an internet connection (3G, 4G or wifi)  
- Save and organise an unlimited number of code snippets  
- Import snippets from  
- Debugging of Javascript and PHP  
- Jquery 1.7.2 included  
- Adjustable window sizes  
- Post snippets to JSFiddle to share with others  
(Copy of the Homepage: )  
Abstract Advisory Information:  
The Vulnerability Laboratory Research Team discovered a persistent input validation vulnerability in the official AppFish Offline Coder v2.2 iOS mobile application.  
Vulnerability Disclosure Timeline:  
2014-04-08: Public Disclosure (Vulnerability Laboratory)  
Discovery Status:  
Affected Product(s):  
Product: Offline Coder - iOS Mobile Application 2.2  
Exploitation Technique:  
Severity Level:  
Technical Details & Description:  
A persistent input validation web vulnerability has been discovered in the official AppFish Offline Coder v2.2 iOS mobile application.  
The vulnerability allows local attackers to inject own malicious persistent script codes on the application-side of the vulnerable software.  
The vulnerability is located in the add `new snippet` function of the `your snippets` module. Attackers are able to inject own script codes by usage of the vulnerable  
add `new snippet` function. The issue affects the `your snippets` module were all snippets will be visible in a drop down list by a history. The attack vector is   
persistent on the application-side and the injection method is local with physical access. The vulnerable input is the `add new snippets` function and the execution   
occurs in the `your snippets`. The script code execution occurs on every click or add of snippets and not in the editor sandbox context. The security risk of the   
persistent web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.1(+)|(-)3.2.  
Exploitation of the persistent vulnerability requires a privileged device user account with physical access and low user interaction. Successful exploitation of the   
persistent web vulnerability results in persistent external redirects, persistent phishing and persistent manipulation of vulnerable connected or affected modules.  
Vulnerable Module(s):  
[+] New Snippet (+)  
Vulnerable Parameter(s):  
[+] snippet name  
Affected Module(s):  
[+] Your Snippets - History Listing (Drop Down)  
Proof of Concept (PoC):  
The persistent input validation vulnerability can be exploited by local attackers with physical device access 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. Install the mobile application to your ios device (ipad or iphone) -  
2. Open the coding client section and on top is the vulnerble add `new snippet` input  
3. Include your own malicous test payload to the new snippet module input and save the settings  
4. Now, just click simple the drop down arrow  
5. The script code execution occurs with persisten attack vector in the `my snippets` item listing on the bottom  
6. Successful reproduce of the persistent script code inject via snippets!  
Solution - Fix & Patch:  
The vulnerability can be patched by a secure parse of the vulnerable `new snippet` input field.  
Filter and encode also the vulnerable output names in the `my snippets` module.  
Security Risk:  
The security risk of the persistent input validation web vulnerability is estimated as medium.  
Credits & Authors:  
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri ( []  
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: - -  
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 © 2014 | Vulnerability Laboratory [Evolution Security]