CORS Misconfiguration: XSS on Trusted Origin

CORS misconfigurationExploitation

From PayloadsAllTheThings by Swissky and contributors, under the MIT licence. Shown as written; the title and classification are ours. Licences. Its authors can have this tip removed by writing to abuse@bugbountytips.org.

If the application does implement a strict whitelist of allowed origins, the exploit codes from above do not work. But if you have an XSS on a trusted origin, you can inject the exploit coded from above in order to exploit CORS again.

ps1
https://trusted-origin.example.com/?xss=<script>CORS-ATTACK-PAYLOAD</script>

Comments

No comments yet.