Cross-site Request Forgery (CSRF) Affecting csrf-csrf package, versions <2.2.1


Severity

0.0
low
0
10

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

Introduced: 10 Oct 2022

CVE NOT AVAILABLE CWE-352 Open this link in a new tab

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
Expand this section

Snyk

3.1 low
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Required
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    Low
  • Availability (A)
    None