I came across this link that dicusses how an attacker could exploit access control allow origin to get an anti-CSRF token:


If the token in the above example was a one-use token (a new one is generated each time the page loads, and expires after use) how would that affect the results?


1 Answer 1


Turning the anti-CSRF token into a nonce doesn't help at all. It simply means that the attacker has to make two requests for each action: First she gets a fresh token, then she makes the actual request with the token. This isn't any harder than reusing the same token for multiple requests.

The problem described in the article isn't news. CSRF protection depends entirely on the same-origin policy, so once you allow people to make cross-site requests, you'll run into trouble.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .