
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-3419 is a Content-Type validation bypass vulnerability in the Fastify Node.js web framework, formally titled "Missing End Anchor in 'subtypeNameReg' Allows Malformed Content-Types to Pass Validation." It affects Fastify versions >= 5.7.2 and <= 5.8.0 (npm package). The vulnerability was published on March 5, 2026, via a GitHub Security Advisory, and added to the NVD on March 6, 2026. It carries a CVSS v3.1 base score of 5.3 (Medium) (GitHub Advisory, Red Hat Bugzilla).
The root cause is a missing end anchor ($) in the subtypeNameReg regular expression defined in lib/content-type.js, classified as CWE-185 (Incorrect Regular Expression) and CWE-625 (Permissive Regular Expression). The original regex /^[\w!#$%&'*+.^\|~-]+\s*/matched only the leading portion of the subtype string rather than the entire string, allowing trailing garbage characters (e.g.,application/json garbageorapplication/json@evil) to pass validation. The fix, applied in commit 67f6c9b, changes the regex to /^[\w!#$%&'+.^`|~-]+\s$/`, enforcing a full-string match per RFC 9110 §8.3.1. When regex-based content-type parsers are configured (a documented Fastify feature), the malformed value — including its trailing garbage — is matched against registered parsers, potentially routing the request to an unintended parser (GitHub Commit, GitHub Advisory).
Successful exploitation allows an unauthenticated remote attacker to send RFC-invalid Content-Type headers that bypass Fastify's validation stage and are processed as if valid. The primary impact is an integrity violation: requests that should be rejected with 415 Unsupported Media Type are instead routed to and handled by content-type parsers they should never reach, potentially circumventing content-type-based security controls or triggering unintended application logic. Confidentiality and availability are not directly impacted per the CVSS assessment, but the bypass could serve as a stepping stone for further exploitation depending on application-specific parser behavior (GitHub Advisory).
There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time. The vulnerability requires no authentication, no user interaction, and is exploitable over the network with low attack complexity, making it straightforward to attempt. The EPSS score is approximately 0.034% (0.000340), placing it in the 4th percentile for exploitation likelihood within 30 days. It is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory).
Content-Type header containing trailing garbage after the subtype token, such as Content-Type: application/json garbage or Content-Type: application/json@evil.application/json).subtypeNameReg lacks a terminal anchor, Fastify's parser accepts the malformed header as valid instead of returning 415 Unsupported Media Type.Content-Type headers with trailing non-standard characters after the subtype token (e.g., application/json garbage, application/json@evil, application/json\x00garbage, application/json(garbage)).Content-Type values that were processed successfully (HTTP 200) rather than rejected with HTTP 415; look for unusual subtype strings containing spaces, special characters, or extra tokens after the media subtype.Upgrade Fastify to version 5.8.1 or later, which corrects the subtypeNameReg regex by adding a terminal anchor ($) to enforce full-string matching per RFC 9110 §8.3.1. As a temporary workaround for environments that cannot immediately upgrade, deploy a Web Application Firewall (WAF) rule to reject HTTP requests containing malformed Content-Type headers with trailing characters after the subtype token. Additionally, review any custom regex-based content-type parsers to ensure they only match properly formatted values (GitHub Advisory, GitHub Commit).
The advisory was published by Fastify maintainer mcollina on March 5, 2026, with jsumners as the remediation developer and UlisesGascon as the remediation reviewer; the vulnerability was originally reported by TarPeg007. Red Hat tracked the issue via Bugzilla (Bug 2445295) and classified it as medium severity. IBM also issued advisories noting the impact on IBM API Connect products. Community discussion was limited, with automated CVE tracking bots on Bluesky and aggregator sites (VulnDB, CVEFeed) picking up the disclosure shortly after publication (GitHub Advisory, Red Hat Bugzilla).
subtypeNameReg regexFix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."