Cross-site Request Forgery (CSRF) Affecting org.webjars.npm:csurf package, versions [0,]

  • Exploit Maturity

    Proof of concept

  • Attack Complexity


  • User Interaction


Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • snyk-id


  • published

    11 Sep 2022

  • disclosed

    11 Sep 2022

  • credit

    Adrian Tiron

How to fix?

There is no fixed version for org.webjars.npm:csurf.


org.webjars.npm:csurf is a Node.js CSRF protection middleware

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to improper validation of the XSRF-Token cookie value, which makes it possible to insert an empty XSRF-Token and still get 200 OK from the server. In addition, CSURF generates the CSRF token using a deprecated SHA1 hashing algorithm, and the secret is been stored as clear text in the _csrf cookie.