I follow a SQLi tool on github and recently saw a conversation between the developer and a user. The user had tried to inject and gotten some errors, in the requests there was a anti-csfr token. The developer then told the user that they didn't know what they were dealing with and closed the issue, because one, they were trying to force an incorrect database, and two, they had gotten the token. Now I'm not saying that the developer is wrong, I'm just curious.

If I'm correct, CSFR, and SQLi are two completely different vulnerabilities and do not correspond with one another. If you have a token that's all fine and dandy, but it's not going to help you with SQLi.

So my question is, what does an anti-CSFR token and SQLi have anything to do with one another, do they go hand in hand?

I'm pretty sure they don't, but I've been wrong before.

1 Answer 1


The only relation I see is that the server might abort if the CSRF token is invalid before running any SQL, so you would need to have the CSRF token to exploit an SQL injection vulnerability.

Of course this would only apply to requests that include CSRF validation, which is generally limited to POST requests, and if there's an SQL injection vulnerability in a POST request there's probably one in a GET request somewhere too.

  • That's what I thought. I mean it doesn't really make sense to me, figured I'd ask just to see if I was an idiot or not, thank you.
    – 13aal
    Aug 2, 2017 at 21:15

You must log in to answer this question.

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