The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

Stored XSS in JSON and sequence of events

Chintan | Last updated: Jan 10, 2021 07:26AM UTC

I have a query on this approach. - I have a form submit operation, which calls makes JSON call to POST the data in DB. - Response of that JSON is either true / false and hence input payload is not returned - I am able to insert XSS script in database using the above API call. - I have another call which gets the data in AJAX call and then DOM is rendering the XSS which was inserted in first call Manually I can identify this issue, however is there a way where Burp can locate these kind of XSS issue during auto scan? which involvers JSON calls and multiple sequence of operations (i.e. one to create data and another to view data)

Uthman, PortSwigger Agent | Last updated: Jan 11, 2021 01:15PM UTC

Hi Chintan, How are you launching your scan? Is the issue found if you launch an Active scan instead of a Crawl & Audit? What scan configuration are you using? Is the DOM-based XSS issue selected under Issues Reported?

Chintan | Last updated: Jan 12, 2021 01:29PM UTC

Steps: 1. Capture the traffic using Proxy [Manually visiting pages and intercepting via proxy] 2. Selecting entire application tree from target tab. 3. Right click and select scan option 4. Selecting Scan Type as "Audit selected" Items 5. Kept scan configuration as it is [Default] Note: DOM based XSS is selected by default in the configuration. 6. Consolidated items to scan to remove unwanted request and duplicate calls 7. Scan started. Issue faced: 1. I have POST API call to add a comment in the system. [JSON call] - Response is also JSON This API stores the value in the database. and I am able to insert XSS script "<script>alert(1);</script> using this API. 2. I have another GET API call which fetches comments from database [JSON call] - Response is also JSON Once data is received from this API call, Client side javascript then reads the data from the API Response and renders the UI. at that time we are seeing the inserted XSS script on UI. Auto scan is not able to capture this stored XSS.

Uthman, PortSwigger Agent | Last updated: Jan 12, 2021 03:41PM UTC