Conversation
…the threat model When a regex-based content-type parser matches requests that have no corresponding key in schema.body.content, validation is skipped. This is an application configuration concern, not a framework vulnerability. Add documentation in three places: - SECURITY.md: new non-vulnerability example in the threat model - Validation-and-Serialization.md: warning about exact-match schema selection - ContentTypeParser.md: note about validation implications of regex parsers Co-Authored-By: Claude Opus 4.6 <[email protected]>
jsumners
approved these changes
Feb 27, 2026
Member
jsumners
left a comment
There was a problem hiding this comment.
Looks good with consistency restored.
Co-authored-by: James Sumners <[email protected]> Signed-off-by: Matteo Collina <[email protected]>
Co-authored-by: James Sumners <[email protected]> Signed-off-by: Matteo Collina <[email protected]>
jsumners
approved these changes
Feb 27, 2026
Fdawgs
requested changes
Mar 7, 2026
Member
Fdawgs
left a comment
There was a problem hiding this comment.
LGTM, just needs rejigging so it doesn't use second person "you" as noted in our style guide.
Fdawgs
approved these changes
Mar 8, 2026
…type-validation-threat-model # Conflicts: # docs/Reference/Validation-and-Serialization.md
Member
Author
|
@Fdawgs ptal |
Fdawgs
approved these changes
Mar 11, 2026
gurgunday
approved these changes
Mar 11, 2026
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.
Summary
SECURITY.mdexplaining that content-type parser/schema mismatches (regex parser accepts a content type with no matchingschema.body.contentkey) are an application configuration concern, not a framework vulnerabilitydocs/Reference/Validation-and-Serialization.mdexplaining that thecontentmap uses exact MIME type matching and how this interacts with regex-based parsersdocs/Reference/ContentTypeParser.mdwarning that regex parsers can accept content types that bypass per-content-type validation if the schemacontentmap lacks a matching entryContext
This addresses reports like the one described in the bug report where a regex-based content-type parser (e.g.,
/^application\/.*json$/) matches requests with content types likeapplication/v1+json, but the validation schema only has a key forapplication/json. The parser runs correctly but validation is skipped because the schema lookup is an exact string match. This is by design — schemas and configuration are trusted inputs in Fastify's threat model.Test plan
npm run lint:markdownpasses (no new lint errors)🤖 Generated with Claude Code