fastify
5.12.8 · 2 Nov 2026MIT23.8M / weekRepositoryHomepagenpmAtom feed
Upgrading fastify From 4.0.1 to 4.29.1
59 releases in betweennotes for 56
Counted from 56 of 59 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking4.18.0
- Deprecated4.26.0
- Deprecated4.11.0
Security
9 advisories still affect 4.29.1
- fastify: request.protocol and request.host Spoofable via X-Forwarded-Proto/Host from Untrusted Connectionsmoderate · GHSA-444r-cwp2-x5xf
- fastify vulnerable to Denial of Service via unhandled exception on HTTP/2 trailer responsesmoderate · GHSA-4mh8-r7rc-xpvc
- fastify vulnerable to request body replacement via an async validation result collisionhigh · GHSA-667r-xxjv-c9mm
Upgrading to 5.12.5 clears them.
Fixes 2 advisories affecting 4.0.1
- Fastify: Incorrect Content-Type parsing can lead to CSRF attack moderate · GHSA-3fjj-p79j-c9hh
- fastify vulnerable to denial of service via malicious Content-Typehigh · GHSA-455w-c45v-86rg
- 4.29.1
Fix for "Invalid content-type parsing could lead to validation bypass" and CVE-2025-32442.
- 4.10.2
Fix for "Incorrect Content-Type parsing can lead to CSRF attack" and CVE-2022-41919
- 4.8.1
This release fixes github.com/fastify/fastify/security/advisories/… for the v4.x line.
- 4.7.0
GitHub Workflows security hardening
Release by release
- Security
Fix for "Invalid content-type parsing could lead to validation bypass" and CVE-2025-32442.
- Security
- New
backport 4.x: Add body parsing on copy move mkcol methods
- New
Support different body schema per content type
- New
Add fastify v4 codemods
- New
Bind
thisto instance in onclose
- New
- Fixed
Server.listen listener is not cleanup properly
- Fixed
v4: Update .npmignore
- Fixed
- Fixed
(backport) Type inferrence with auxilliary hook handlers
- Fixed
- New
Adds webdav methods that require body & content type parsing
- New
Disable request logging
- New
Add mkcalendar and report methods
- New
Handle synchronous errors in errorHandler
- New
- New
Add a Firebase Functions step by step guide
- New
Use FifoMap to check contentType
- Fixed
Cb is not a function at fallbackErrorHandler
- Fixed
types: Fix test failure
- Fixed
Database migration doc missing db connection code
- New
- Fixed
Amend error codes for latest avvio v8.3.0
- Fixed
types: Request route options url add undefined
- Fixed
- Deprecated
Deprecate
Reply#getResponseTime()in favour ofReply#elapsedTime - New
routes: Expose findRoute and param validator
- New
Add use semicolon delimter config, default = true
- New
Expose method for setGenReqId on FastifyInstance
- Deprecated
74 other lines we could not sort, mostly version bumps
- 4.27.0
types: Narrow code reply type based on schema
- 4.27.0
types:
reply.getSerializationFunctioncan returnundefined - 4.27.0
types: Request route schema might be undefined
- 4.26.2
types: Export preClose hook types
- 4.26.0
Sync next
- 4.25.0
types: Nullish error types in callback function's parameter for
afterandreadymethod - 4.22.0
Make FastifySchemaValidationError.params wider
- 4.21.0
ERR_REP_ALREADY_SENT hint that a route may be missing "return reply"
- 4.20.0
Update Prototype-Poisoning.md
- 4.20.0
Improve hooks.validate
354 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.