XSS vulnerability from Sourcecodester QR Code Attendance System 1.0 (delete-student.php)
CVE-2024-8170
A vulnerability classified as problematic has been found in SourceCodester Zipped Folder Manager App 1.0. This affects an unknown code of the file /endpoint/add-folder.php. The manipulation of the argument
folder
with an unknown input leads to a unrestricted upload vulnerability. CWE is classifying the issue as CWE-434. The product allows the attacker to upload or transfer files of dangerous types that can be automatically processed within the product’s environment. This is going to have an impact on availability.
The advisory is shared at github.com. This vulnerability is uniquely identified as CVE-2024-8170. The exploitability is told to be easy. It is possible to initiate the attack remotely. It demands that the victim is doing some kind of user interaction. Technical details and a public exploit are known. MITRE ATT&CK project uses the attack technique T1608.002 for this issue.
Affected Project: QR Code Attendance System 1.0
Official Website: https://www.sourcecodester.com/php/17242/qr-code-attendance-system-using-php-and-mysql-source-code.html
Version: 1.0
Related Code file: delete-student.php
Injection parameter: student
Vulnerability Description
The student parameter is vulnerable to the tested XSS payload: %3cIMG%20%22%22%22%3e%3cSCRIPT%3ealert(%22XSS%22)%3c%2fSCRIPT%3e%22%3e
. This string is encoded and when decoded, it attempts to inject a script into the webpage:
<IMG """"><SCRIPT>alert("XSS")</SCRIPT>">
Application does not properly sanitize or validate the input, this script could be executed in the user’s browser, leading to an XSS attack.
Demonstration
Below is how QR Code Attendance System looks like:
We can delete student as such:
Intercept the delete(delete-student.php) traffic using Burp Suite and inject the following payload:
Payload used above is HTML encoded and decodes as <IMG """><SCRIPT>alert("XSS")</SCRIPT>">
Upon sending the modifying traffic containing XSS payload, we can verify the vulnerability: