Incorrect Regular Expression in Fastify - CVE-2026-3419

 

Incorrect Regular Expression in Fastify - CVE-2026-3419

Published: April 14, 2026


Vulnerability identifier: #VU125978
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-3419
CWE-ID: CWE-185
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to bypass content-type validation and submit malformed requests that are processed by the server.

The vulnerability exists due to incorrect regular expression in subtypeNameReg when validating Content-Type headers containing trailing characters after the subtype token. A remote attacker can send a specially crafted request with a malformed Content-Type header to bypass content-type validation and submit malformed requests that are processed by the server.

When regex-based content-type parsers are in use, the malformed header value may be matched against registered parsers using the full string including the trailing garbage.


Affected software

Fastify

How to mitigate CVE-2026-3419

Install security update from vendor's website.

Fastify - update to 5.8.1

External References

Related Security Bulletins