Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2023-27495

5.3 · MEDIUM
Published Apr 20, 2023 fastify CWE-352 EPSS 0.33% (26th pctl)

Overview

CVE-2023-27495 is a medium-severity vulnerability affecting fastify csrf-protection. It was published on April 20, 2023 and has a CVSS 3.1 base score of 5.3 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 5.3, rated MEDIUM. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

Technical Description

@fastify/csrf-protection is a plugin which helps protect Fastify servers against CSRF attacks. The CSRF protection enforced by the @fastify/csrf-protection library in combination with @fastify/cookie can be bypassed from network and same-site attackers under certain conditions. @fastify/csrf-protection supports an optional userInfo parameter that binds the CSRF token to the user. This parameter has been introduced to prevent cookie-tossing attacks as a fix for CVE-2021-29624. Whenever userInfo parameter is missing, or its value can be predicted for the target user account, network and same-site attackers can 1. fixate a _csrf cookie in the victim's browser, and 2. forge CSRF tokens that are valid for the victim's session. This allows attackers to bypass the CSRF protection mechanism. As a fix, @fastify/csrf-protection starting from version 6.3.0 (and v4.1.0) includes a server-defined secret hmacKey that cryptographically binds the CSRF token to the value of the _csrf cookie and the use

Remediation

Check the references section for vendor advisories and patches from fastify. Update csrf-protection to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
fastify csrf-protection >= 0, < 4.1.0 Affected

Frequently Asked Questions

What is CVE-2023-27495?

CVE-2023-27495 is a medium-severity vulnerability affecting fastify csrf-protection. It was published on April 20, 2023 and has a CVSS 3.1 base score of 5.3 (MEDIUM).

How severe is CVE-2023-27495?

This vulnerability has a CVSS 3.1 base score of 5.3, rated MEDIUM. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

How do I fix or remediate CVE-2023-27495?

Check the references section for vendor advisories and patches from fastify. Update csrf-protection to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2023-27495?

CyberStrike's AI-powered security agents can automatically detect CVE-2023-27495 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.