I found an xss on subdomain.example.com and i verified that the domain api.example.com accepts subdomain.example.com as valid origin. Can i exploit this as cors by inserting a CORS script in subdomain.example.com and send the link to victim?

  • Yes, that should work. I suggest you code a PoC to confirm, which shouldn't be too difficult. – paj28 May 30 '19 at 17:07
  • @paj28, Thanks for confirming it. As i was able to inject a <script src tag, do you know a javascript cors code that works with that? The ones i tried were not working. – new liyuser May 30 '19 at 17:42
  • Just use XmlHttpRequest, when you do it cross-domain, CORS kicks in automatically – paj28 May 30 '19 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.