Cross-site Request Forgery (CSRF) Affecting csrf-csrf package, versions <2.2.1
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 SNYK-JS-CSRFCSRF-3042410
- published 11 Oct 2022
- disclosed 10 Oct 2022
- credit Unknown
How to fix?
Upgrade csrf-csrf
to version 2.2.1 or higher.
Overview
csrf-csrf is an utility package to help implement stateless CSRF protection using the Double Submit Cookie Pattern in express.
Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) by using the default cookie name when none is provided, which is prefixed with Host__
instead of __Host-
.
Workaround
This vulnerability can be avoided by setting cookieName
to a safe default value.
References
CVSS Scores
version 3.1