Cross-site Scripting (XSS) - Stored in imran300/inventory
Reported on
Aug 19th 2021
✍️ Description
Stored xss bug using a xss payload in the employee name when adding a new employee
🕵️♂️ Proof of Concept
Goto http://localhost/inventory/employees/add_employee and click on add employee and copy paste the following xss payload and paste it in the EMP NAME
"><img src=x onerror=alert(document.cookie)>
Click on safe and see the xss popup with the cookie.
💥 Impact
Possible to steal admin cookies or take over another account via cookie grepping.
💥 Remediation
Validate user input
💥References
https://owasp.org/www-community/attacks/xss/
https://en.wikipedia.org/wiki/Cross-site_scripting
https://www.acunetix.com/websitesecurity/cross-site-scripting/
https://www.imperva.com/learn/application-security/cross-site-scripting-xss-attacks/
Occurrences
Hey ribersec, I've just contacted the repo's maintainer about this. Good job!