Skip to content

Update dependency fastify to ^4.29.1 [SECURITY]#9

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-fastify-vulnerability
Open

Update dependency fastify to ^4.29.1 [SECURITY]#9
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-fastify-vulnerability

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate bot commented Feb 3, 2026

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
fastify (source) ^4.17.0^4.29.1 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2026-25223

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

CVE-2026-3635

Summary

When trustProxy is configured with a restrictive trust function (e.g., a specific IP like trustProxy: '10.0.0.1', a subnet, a hop count, or a custom function), the request.protocol and request.host getters read X-Forwarded-Proto and X-Forwarded-Host headers from any connection — including connections from untrusted IPs. This allows an attacker connecting directly to Fastify (bypassing the proxy) to spoof both the protocol and host seen by the application.

Affected Versions

fastify <= 5.8.2

Impact

Applications using request.protocol or request.host for security decisions (HTTPS enforcement, secure cookie flags, CSRF origin checks, URL construction, host-based routing) are affected when trustProxy is configured with a restrictive trust function.

When trustProxy: true (trust everything), both host and protocol trust all forwarded headers — this is expected behavior. The vulnerability only manifests with restrictive trust configurations.


Release Notes

fastify/fastify (fastify)

v4.29.1

Compare Source

⚠️ Security Release ⚠️

Fix for "Invalid content-type parsing could lead to validation bypass" and CVE-2025-32442.

Full Changelog: fastify/fastify@v4.29.0...v4.29.1

v4.29.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify@v4.28.1...v4.29.0

v4.28.1

Compare Source

What's Changed

Full Changelog: fastify/fastify@v4.28.0...v4.28.1

v4.28.0

Compare Source

What's Changed

Full Changelog: fastify/fastify@v4.27.0...v4.28.0

v4.27.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify@v4.26.2...v4.27.0

v4.26.2

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify@v4.26.1...v4.26.2

v4.26.1

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify@v4.26.0...v4.26.1

v4.26.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify@v4.25.2...v4.26.0

v4.25.2

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify@v4.25.1...v4.25.2

v4.25.1

Compare Source

What's Changed

Full Changelog: fastify/fastify@v4.25.0...v4.25.1

v4.25.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify@v4.24.3...v4.25.0

v4.24.3

Compare Source

What's Changed

Full Changelog: fastify/fastify@v4.24.2...v4.24.3

v4.24.2

Compare Source

What's Changed

Full Changelog: fastify/fastify@v4.24.1...v4.24.2

v4.24.1

Compare Source

What's Changed

Full Changelog: fastify/fastify@v4.24.0...v4.24.1

v4.24.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify@v4.23.2...v4.24.0

v4.23.2

Compare Source

What's Changed

Full Changelog: fastify/fastify@v4.23.1...v4.23.2

v4.23.1

Compare Source

What's Changed

Full Changelog: fastify/fastify@v4.23.0...v4.23.1

v4.23.0

Compare Source

What's Changed

New Contributors

**Full Change


Configuration

📅 Schedule: Branch creation - "" in timezone Europe/Stockholm, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/npm-fastify-vulnerability branch from 36299bf to 96f5a9c Compare February 4, 2026 11:46
@renovate renovate bot changed the title Update dependency fastify to ^4.29.1 [SECURITY] Update dependency fastify to v5 [SECURITY] Feb 4, 2026
@renovate renovate bot force-pushed the renovate/npm-fastify-vulnerability branch from 96f5a9c to 7bf4ecf Compare February 13, 2026 11:56
@renovate renovate bot changed the title Update dependency fastify to v5 [SECURITY] Update dependency fastify to ^4.29.1 [SECURITY] Feb 13, 2026
@renovate renovate bot force-pushed the renovate/npm-fastify-vulnerability branch from 7bf4ecf to d6805a9 Compare February 14, 2026 08:13
@renovate renovate bot changed the title Update dependency fastify to ^4.29.1 [SECURITY] Update dependency fastify to v5 [SECURITY] Feb 14, 2026
@renovate renovate bot force-pushed the renovate/npm-fastify-vulnerability branch from d6805a9 to 013a6e1 Compare February 17, 2026 07:39
@renovate renovate bot changed the title Update dependency fastify to v5 [SECURITY] Update dependency fastify to ^4.29.1 [SECURITY] Feb 17, 2026
@renovate renovate bot force-pushed the renovate/npm-fastify-vulnerability branch from 013a6e1 to 763748a Compare February 20, 2026 07:51
@renovate renovate bot changed the title Update dependency fastify to ^4.29.1 [SECURITY] Update dependency fastify to v5 [SECURITY] Feb 20, 2026
@renovate renovate bot force-pushed the renovate/npm-fastify-vulnerability branch from 763748a to cb8bd2c Compare March 8, 2026 08:56
@renovate renovate bot changed the title Update dependency fastify to v5 [SECURITY] Update dependency fastify to ^4.29.1 [SECURITY] Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants