Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sechurity/07c5a3a15f21313ee657d05baadbee19 to your computer and use it in GitHub Desktop.

Select an option

Save sechurity/07c5a3a15f21313ee657d05baadbee19 to your computer and use it in GitHub Desktop.

XSS vulnerability from Sourcecodester Profile Registration without Reload/Refresh 1.0 (add.php)

Affected Project: Profile Registration without Reload/Refresh

Official Website: https://www.sourcecodester.com/php/17587/profile-registration-without-reloadrefresh-using-ajax-php-and-mysql-source-code.html

Version: 1.0

Related Code file: add.php

Injection parameters: email_address, address, company_name, job_title, jobDescription

Vulnerability Description

The parameters: email_address, address ,company_name, job_title, jobDescription parameter are all vulnerable to the tested XSS payload: <script>alert('parameter_name XSS')</script>. This string is injected to the webpage when it is loaded in the admin dashboard.

Application does not properly sanitize or validate the input, this script could be executed in the user's browser, leading to an XSS attack.

This vulnerability is similar to CVE-2024-9092 but addressed the part where the input does not need to be encoded and there is no front-end logic checking the input. Additionally the parameters other than full_name are affected.

Demonstration

Below is how Profile Registration without Reload/Refresh System looks like and with XSS payload filled in:

Screenshot 2024-10-04 000751

Below is the admin page: Screenshot 2024-10-04 001119

Upon sending the form containing XSS payload, we can verify the vulnerability from admin.php page: Screenshot 2024-10-04 000825

Screenshot 2024-10-04 000834

Screenshot 2024-10-04 000842

Screenshot 2024-10-04 000851

Screenshot 2024-10-04 000900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment