Menu

1 / 6

the CSRF token

DEV Community·Rouwel Ngacha·6 months ago
#62P066pl
#beginners#cybersecurity#security#webdev#bank
Reading 0:00
15s threshold

Hello world, my name is rrouwelng and I am here to talk about the CSRF token.

So, what is a CSRF token? A Cross-Site Request Forgery token is a unique and unpredictable value generated by server-side application. This was developed as a countermeasure to the Cross-Site Request Forgery attack that was first documented in the early 2000's.

What is a Cross-Site Request Forgery attack ? Allow me to give an example.

This is Bob,

Bob, logs into his bank at

Bob then decided to go read an article at a certain website at

Please note that Bob hasn't logged out of his bank account.

The site 'welikekittens.com' is set up by a malicious actor(call him swipper).

The website(welikekittens.com) is set up to send a form that is basically just a POST request to Bob's bank website that basically tells it to credit a certain amount of money to the account of the attackers choosing.

Because of how browsers work, every request(GET, POST or otherwise ) sent from bob's browser to the bank's server has the authentication…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.