Test API docs for XSS
When testing an API, look for API documentation pages that may be vulnerable to XSS. Check if the page uses template strings to build HTML, with values from the OpenAPI spec dropped inside, such as content="${something}" or <title>${something}</title>. Try setting the description or title fields to a payload like "</script><script>alert(1)</script> and see if it is reflected in the page without proper escaping. If the payload is executed, it may indicate an XSS vulnerability. To confirm, test the payload in a real browser and verify that the script is executed. Also, run a control test with a normal description to ensure it's the payload doing the damage.
Follow #openapi or #xss for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.
Comments
No comments yet.