Incorrect Regular Expression Affecting fastify package, versions >=5.7.2 <5.8.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.03% (10th percentile)

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 Learn

Learn about Incorrect Regular Expression vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-FASTIFY-15428269
  • published6 Mar 2026
  • disclosed5 Mar 2026
  • creditSaad Fellahi

Introduced: 5 Mar 2026

NewCVE-2026-3419  (opens in a new tab)
CWE-185  (opens in a new tab)

How to fix?

Upgrade fastify to version 5.8.1 or higher.

Overview

fastify is an overhead web framework, for Node.js.

Affected versions of this package are vulnerable to Incorrect Regular Expression in the Content-Type header validation. An attacker can cause the server to incorrectly process requests with malformed Content-Type headers by sending values that include trailing invalid characters, allowing these requests to bypass intended validation and be handled by inappropriate content-type parsers.

Workaround

This vulnerability can be mitigated by deploying a WAF rule to protect against this.

References

CVSS Base Scores

version 4.0
version 3.1