PT-2023-21170 · Npm · @Fastify/Csrf-Protection

Pedromigueladao

·

Published

2023-04-20

·

Updated

2023-05-02

·

CVE-2023-27495

CVSS v3.1

5.3

Medium

VectorAV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
Name of the Vulnerable Software and Affected Versions @fastify/csrf-protection versions prior to 4.1.0 @fastify/csrf-protection versions prior to 6.3.0
Description The CSRF protection mechanism in the @fastify/csrf-protection library can be bypassed by network and same-site attackers under certain conditions, allowing them to fixate a csrf cookie in the victim's browser and forge valid CSRF tokens. This is possible when the userInfo parameter is missing or its value can be predicted for the target user account. The issue can be exploited by attackers to bypass the CSRF protection.
Recommendations For versions prior to 4.1.0, upgrade to version 4.1.0 or later. For versions prior to 6.3.0, upgrade to version 6.3.0 or later. As a temporary mitigation for users unable to upgrade, use a random, non-predictable userInfo parameter for each user.

Exploit

Fix

CSRF

Weakness Enumeration

Related Identifiers

CVE-2023-27495
GHSA-QRGF-9GPC-VRXW

Affected Products

@Fastify/Csrf-Protection