Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1qam1nLXg0NTYtdzk3Ns4AAvOC

Incorrect default cookie name and recommendation

Impact

What kind of vulnerability is it? Who is impacted?

The default cookie name (and documentation recommendation) was prefixed with Host__ instead of __Host-. The point of this prefix is for additional security, to ensure that, when no domain option is provided in the cookie options, we can guarantee the cookie came from the correct domain.

Patches

Has the problem been patched? What versions should users upgrade to?

Yes, the problem is patched from version 2.2.1, this will not be back ported, but you can use the workaround described below.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

You can work around this by providing a custom cookieName as part of the options, which is correctly prefixed with __Host-.

References

Are there any links users can visit to find out more?

https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#cookie-with-__host-prefix

For more information

If you have any questions or comments about this advisory:

Permalink: https://github.com/advisories/GHSA-jjmg-x456-w976
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1qam1nLXg0NTYtdzk3Ns4AAvOC
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: over 1 year ago
Updated: over 1 year ago


Identifiers: GHSA-jjmg-x456-w976
References: Repository: https://github.com/Psifi-Solutions/csrf-csrf
Blast Radius: 0.0

Affected Packages

npm:csrf-csrf
Dependent packages: 7
Dependent repositories: 217
Downloads: 85,961 last month
Affected Version Ranges: < 2.2.1
Fixed in: 2.2.1
All affected versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 2.0.0, 2.0.1, 2.1.0, 2.2.0
All unaffected versions: 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4