
BNaveen787221 (Community Member) asked a question.
It is possible to trick a user into executing potentially dangerous actions against the target site due to a lack of CrossSite-Request-Forgery (CSRF) protections. CSRF attacks are a class of confused deputy attacks that exploit the behavior of browsers always sending authorization cookies in requests. The target site has no secure way of verifying the request was initiated from a link on a trusted domain.
Recommendations
Protect all forms by generating a random unique nonce value each time the page is requested. This nonce value should be included into the form as a parameter, usually as a hidden input field. These nonce values should be linked to the user's session ID and validated on submission by comparing the generated nonce value for the form with the one that was submitted by the user. When possible, use built in CSRF protections offered by various vetted libraries or frameworks instead of developing a custom implementation.
.png)
Hi @BNaveen787221 (Community Member) ,
Do you have a specific question on CSRF?
If you would like to review CSRF flaws with a Veracode Application Security Consultant I would recommend you schedule a consultation call to discuss.
You can check out this knowledge article (https://community.veracode.com/s/article/How-to-schedule-a-consultation-call) on how to schedule a consultation call with us.
Thank you,
Boy Baukema