Submit #393512: GitHub Insurance Management System 1.0 Cross Site Scriptinginfo

TitleGitHub Insurance Management System 1.0 Cross Site Scripting
DescriptionDescription I have identified a Stored Cross-Site Scripting (XSS) vulnerability in the Life Insurance Management System, specifically within the addClient.php endpoint. This vulnerability allows an attacker to inject malicious JavaScript code into the 'Client ID:' field during the client details in adding client process. The injected script is then reflected in the admin-side interface, posing a significant risk of unauthorized actions or data theft. 2. Steps to Reproduce Navigate to the client page http://127.0.0.1/life-insurance-management-system/lims/addClient.php Inject Malicious Script: In the "CLIENT ID" field, input the following payload: <script>alert(document.domain)</script> Submit the Form: Submit the form with the injected payload. Now click on CLIENTS tab. Trigger the XSS: Navigate to the add client section. Upon adding the malicious script in CLIENT ID field, click on save and now click on CLIENTS tab, the malicious script is executed, resulting in an alert box that displays the document's domain, confirming the XSS vulnerability. 3. Impact Confidentiality: Attackers can exploit this vulnerability to steal sensitive information, including session tokens, cookies, or other private data. Integrity: Attackers could manipulate the content displayed to users, potentially altering important information. Availability: Malicious scripts can be used to create denial of service (DoS) conditions through heavy or infinite loop scripts. 4. Proof of Concept Payload: <script>alert(document.domain)</script> 5. Recommendations To address and mitigate the identified XSS vulnerability, consider implementing the following measures: Sanitize Input: Ensure that all user inputs are sanitized and validated before being stored in the database. Use libraries or frameworks that offer secure input handling. Escape Output: Properly escape and encode output when displaying user-generated content to prevent the execution of injected scripts. Content Security Policy (CSP): Implement a robust Content Security Policy to limit the sources from which scripts can be loaded and executed, reducing the risk of XSS attacks. Github link to this application: https://github.com/nafisulbari/life-insurance-management-system
Source⚠️ http://127.0.0.1/life-insurance-management-system/lims/addClient.php
User
 fahadletsleep (UID 73320)
Submission08/18/2024 13:09 (2 years ago)
Moderation08/27/2024 13:22 (9 days later)
StatusAccepted
VulDB entry275918 [nafisulbari/itsourcecode Insurance Management System 1.0 addClient.php CLIENT ID cross site scripting]
Points20

Do you need the next level of professionalism?

Upgrade your account now!