fix(deps): update dependency fastify to v5.8.5 [security]#8157
Merged
renovate[bot] merged 1 commit intomainfrom Apr 16, 2026
Merged
fix(deps): update dependency fastify to v5.8.5 [security]#8157renovate[bot] merged 1 commit intomainfrom
renovate[bot] merged 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.8.3→5.8.5GitHub Vulnerability Alerts
CVE-2026-33806
Summary
A validation bypass vulnerability exists in Fastify v5.x where request body validation schemas specified via
schema.body.contentcan be completely circumvented by prepending a single space character (\x20) to theContent-Typeheader. The body is still parsed correctly as JSON (or any other content type), but schema validation is entirely skipped.This is a regression introduced by commit
f3d2bcb(fix for CVE-2025-32442).Details
The vulnerability is a parser-validator differential between two independent code paths that process the raw
Content-Typeheader differently.Parser path (
lib/content-type.js, line ~67) appliestrimStart()before processing:Validator path (
lib/validation.js, line 272) splits on/[ ;]/before trimming:The
ContentTypeclass appliestrimStart()before processing, so the parser correctly identifiesapplication/jsonand parses the body. However,getEssenceMediaTypesplits on/[ ;]/before trimming, so the leading space becomes a split point, producing an empty string. The validator looks up a schema for content-type"", finds nothing, and skips validation entirely.Regression source: Commit
f3d2bcb(April 18, 2025) changed the split delimiter from';'to/[ ;]/to fix CVE-2025-32442. The old code (header.split(';', 1)[0].trim()) was not vulnerable to this vector because.trim()would correctly handle the leading space. The new regex-based split introduced the regression.PoC
Output:
Impact
Any Fastify application that relies on
schema.body.content(per-content-type body validation) to enforce data integrity or security constraints is affected. An attacker can bypass all body validation by adding a single space before the Content-Type value. The attack requires no authentication and has zero complexity — it is a single-character modification to an HTTP header.This vulnerability is distinct from all previously patched content-type bypasses:
Recommended fix — add
trimStart()before the split ingetEssenceMediaType:Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NRelease Notes
fastify/fastify (fastify)
v5.8.5Compare Source
This fixes CVE CVE-2026-33806 GHSA-247c-9743-5963.
What's Changed
New Contributors
Full Changelog: fastify/fastify@v5.8.4...v5.8.5
v5.8.4Compare Source
Full Changelog: fastify/fastify@v5.8.3...v5.8.4
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.