bWAPP - Cross Site Scripting Stored (Change Secret)

bWAPP – Cross Site Scripting Stored (Change Secret)

In this walk through, we will be going through the Cross Site Scripting Stored (Change Secret) vulnerability section from bWAPP Labs. We will be exploring and exploiting Stored Cross Scripting vulnerability in Change Secret implementations and learn how application are affected because of it. So, let’s get started with the Hacking without any delay.

Cross Site Scripting Stored (Change Secret)

Table of Contents

Security: Low

  • Setting the security level to Low.

Security level Low

  • The application has change secret functionality where a user can change his secret. It issues a POST request to xss_stored_3.php file to save the secret in the DB.

XSS - Stored (Change Secret)

Burpsuite intercept

  • We can try to add our payloads in the input field but we are unable to access it to execute it anyway. As per the source code and the intercepted request, we have to username already filled and is hidden in the page source which we can easily view by removing the hidden in the input type.

Page source code

  • I used the below payload in the login parameter by intercepting the request with Burpsuite. On forwarding and turning the proxy off, i received my pop up alert.

"><img src=x onerror=alert(1)>


XSS pop up alert

Also Read: bWAPP – Cross Site Scripting Reflected (User-Agent)



So, we finally completed all the security levels for the bWAPP Cross Site Scripting Stored (Change Secret) Vulnerability. We looked into the various ways how application has been set up in various levels and how we can bypass the security controls implemented. Stored-XSS attacks can be mitigated by performing input sanitization on endpoints, whitelist the allowed characters in the input and using a WAF. Along with that, we can prevent data from any untrusted source to be dynamically written to the HTML document. On that note, i will take your leave and will meet you in next one with another bWAPP vulnerability writeup, till then “Keep Hacking”.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top