Skip to content

🚨 [security] Update fastify 5.6.1 → 5.7.4 (minor)#60

Open
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/fastify-5.7.4
Open

🚨 [security] Update fastify 5.6.1 → 5.7.4 (minor)#60
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/fastify-5.7.4

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented Feb 3, 2026


Welcome to Depfu 👋

This is one of the first three pull requests with dependency updates we've sent your way. We tried to start with a few easy patch-level updates. Hopefully your tests will pass and you can merge this pull request without too much risk. This should give you an idea how Depfu works in general.

After you merge your first pull request, we'll send you a few more. We'll never open more than seven PRs at the same time so you're not getting overwhelmed with updates.

Let us know if you have any questions. Thanks so much for giving Depfu a try!



🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ fastify (5.6.1 → 5.7.4) · Repo

Security Advisories 🚨

🚨 Fastify's Content-Type header tab character allows body validation bypass

Impact

A validation bypass vulnerability exists in Fastify where request body validation schemas specified by Content-Type can be completely circumvented. By appending a tab character (\t) followed by arbitrary content to the Content-Type header, attackers can bypass body validation while the server still processes the body as the original content type.

For example, a request with Content-Type: application/json\ta will bypass JSON schema validation but still be parsed as JSON.

This vulnerability affects all Fastify users who rely on Content-Type-based body validation schemas to enforce data integrity or security constraints. The concrete impact depends on the handler implementation and the level of trust placed in the validated request body, but at the library level, this allows complete bypass of body validation for any handler using Content-Type-discriminated schemas.

This issue is a regression or missed edge case from the fix for a previously reported vulnerability.

Patches

This vulnerability has been patched in Fastify v5.7.2. All users should upgrade to this version or later immediately.

Workarounds

If upgrading is not immediately possible, user can implement a custom onRequest hook to reject requests containing tab characters in the Content-Type header:

fastify.addHook('onRequest', async (request, reply) => {
  const contentType = request.headers['content-type']
  if (contentType && contentType.includes('\t')) {
    reply.code(400).send({ error: 'Invalid Content-Type header' })
  }
})

Resources

🚨 Fastify Vulnerable to DoS via Unbounded Memory Allocation in sendWebStream

Impact

A Denial of Service vulnerability in Fastify’s Web Streams response handling can allow a remote client to exhaust server memory. Applications that return a ReadableStream (or Response with a Web Stream body) via reply.send() are impacted. A slow or non-reading client can trigger unbounded buffering when backpressure is ignored, leading to process crashes or severe degradation.

Patches

The issue is fixed in Fastify 5.7.3. Users should upgrade to 5.7.3 or later.

Workarounds

Avoid sending Web Streams from Fastify responses (e.g., ReadableStream or Response bodies). Use Node.js streams (stream.Readable) or buffered payloads instead until the project can upgrade.

References

Release Notes

5.7.3

⚠️ Security Release

What's Changed

  • docs: update Reply.send() documentation for string serialization by @mcollina in #6466
  • chore: ignore agents config files by @mcollina in #6474
  • docs: update vulnerability reporting to use GitHub Security by @mcollina in #6475

Full Changelog: v5.7.2...v5.7.3

5.7.2

⚠️ Notice ⚠️

Parsing of the content-type header has been improved to a strict parser in PR #6414. This means only header values in the form described in RFC 9110 are accepted.

What's Changed

New Contributors

Full Changelog: v5.7.1...v5.7.2

5.7.1

What's Changed

Full Changelog: v5.7.0...v5.7.1

5.7.0

What's Changed

New Contributors

Full Changelog: v5.6.2...v5.7.0

5.6.2

What's Changed

  • refactor: rename source file names with kebab-case by @jean-michelet in #6331
  • ci(ci): check dependabot prs originate from repo by @Fdawgs in #6330
  • fix: accept htab ows by @jean-michelet in #6303
  • fix: handle non FastifyErrors in custom handler properly, set type of error-parameter for setErrorHandler and errorHandler to unknown, but configurable via generic TError by @Uzlopak in #6308
  • build(deps-dev): remove @fastify/pre-commit by @Fdawgs in #6319
  • ci: improve citgm workflows by @Uzlopak in #6334
  • docs: explain stream error handling by @lundibundi in #5746
  • fix: error throwing in reply by @juanlet in #6299
  • refactor: delegate options processing to a dedicated function by @jean-michelet in #6333
  • ci: remove label of citgm only on pull_request.labeled, add options for workflow_dispatch by @Uzlopak in #6335
  • chore: Bump actions/checkout from 4 to 5 by @dependabot[bot] in #6343
  • chore: Bump joi from 17.13.3 to 18.0.1 by @dependabot[bot] in #6347
  • chore: Bump lycheeverse/lychee-action from 2.4.1 to 2.6.1 by @dependabot[bot] in #6345
  • chore: Bump actions/dependency-review-action from 4.7.1 to 4.8.0 by @dependabot[bot] in #6344
  • chore: Bump actions/labeler from 5 to 6 by @dependabot[bot] in #6341
  • chore: Bump actions/setup-node from 4 to 5 by @dependabot[bot] in #6342
  • chore: Bump actions/github-script from 7 to 8 by @dependabot[bot] in #6340
  • docs: mention that addHttpMethod override existing methods by @jean-michelet in #6350
  • chore: remove reference to simple-get by @ilteoood in #6353
  • chore: remove commented tests by @ilteoood in #6352
  • fix: respect child logger factory in fastify options by @cysp in #6349
  • docs(ecosystem): adding attaryz/fastify-devtools to community plugins by @attaryz in #6339
  • docs: remove ambiguity from statement by @udohjeremiah in #6360
  • chore: add @fastify/sse as fastify core plugin to documentation and citgm by @manshusainishab in #6364
  • docs(guides/fluent-schema): replace last nb usage by @Fdawgs in #6365
  • style(ci): remove whitespace from concurrency group by @Fdawgs in #6366
  • docs: Fix broken link to TypeBox doc website wrt AJV setup by @melroy89 in #6367
  • docs(reference/plugins): mention async plugins by @Fdawgs in #6357
  • chore: add max-len ESLint rule with 120 character limit by @emicovi in #6221
  • chore: Bump actions/dependency-review-action from 4.8.0 to 4.8.1 by @dependabot[bot] in #6374
  • chore: Bump pino from 9.14.0 to 10.1.0 in the dependencies-major group by @dependabot[bot] in #6378
  • chore: Bump pnpm/action-setup from 4.1.0 to 4.2.0 by @dependabot[bot] in #6375
  • chore: Bump tsd from 0.32.0 to 0.33.0 in the dev-dependencies-typescript group by @dependabot[bot] in #6346
  • chore: Bump lycheeverse/lychee-action from 2.6.1 to 2.7.0 by @dependabot[bot] in #6377
  • fix: handle web stream payload in HEAD route by @orionmiz in #6372
  • chore: Bump actions/setup-node from 5 to 6 by @dependabot[bot] in #6376
  • chore: Bump borp from 0.20.2 to 0.21.0 by @dependabot[bot] in #6379
  • fix: parse ipv6 hostname by @jean-michelet in #6373
  • fix: consistent error handling for custom validators in async validation contexts by @emicovi in #6247

New Contributors

Full Changelog: v5.6.1...v5.6.2

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Feb 3, 2026
@depfu depfu bot requested a review from microwavekonijn February 3, 2026 00:05
@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

⚠️ No Changeset found

Latest commit: 75f4a94

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants