[Snyk] Security upgrade @nestjs/platform-fastify from 7.6.13 to 11.1.11#44
[Snyk] Security upgrade @nestjs/platform-fastify from 7.6.13 to 11.1.11#44
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-NESTJSPLATFORMFASTIFY-14724255
There was a problem hiding this comment.
Pull request overview
This PR attempts to upgrade @nestjs/platform-fastify from version 7.6.13 to 11.1.11 to address a critical Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability (SNYK-JS-NESTJSPLATFORMFASTIFY-14724255) with a severity score of 741.
Key changes:
- Upgrades
@nestjs/platform-fastifyfrom 7.6.13 to 11.1.11 (a 4 major version jump) - Introduces numerous transitive dependency upgrades including Fastify from 3.x to 5.x
- Updates various Fastify ecosystem packages (@fastify/cors, @fastify/formbody, etc.)
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Updates @nestjs/platform-fastify dependency version to ^11.1.11 |
| package-lock.json | Reflects the full dependency tree changes including major version upgrades for Fastify (3.x → 5.x) and numerous Fastify ecosystem packages, plus internal NestJS platform-fastify dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@nestjs/graphql": "^7.9.11", | ||
| "@nestjs/microservices": "^7.6.12", | ||
| "@nestjs/platform-fastify": "^7.6.12", | ||
| "@nestjs/platform-fastify": "^11.1.11", |
There was a problem hiding this comment.
This upgrade introduces a critical peer dependency mismatch. The package @nestjs/platform-fastify@11.1.11 requires @nestjs/common@^11.0.0 and @nestjs/core@^11.0.0 as peer dependencies (as seen in lines 2105-2108 of package-lock.json), but the project is currently using @nestjs/common@^7.5.1 and @nestjs/core@^7.5.1.
This is a breaking change that will cause runtime errors. To safely apply this security upgrade, you need to also upgrade @nestjs/common, @nestjs/core, and likely other NestJS packages (@nestjs/graphql, @nestjs/microservices, etc.) to version 11.x. This is a major version upgrade across the entire NestJS ecosystem and will require significant testing and potential code changes to handle breaking changes between NestJS v7 and v11.
| "@nestjs/platform-fastify": "^11.1.11", | |
| "@nestjs/platform-fastify": "^7.6.15", |
| "@nestjs/graphql": "^7.9.11", | ||
| "@nestjs/microservices": "^7.6.12", | ||
| "@nestjs/platform-fastify": "^7.6.12", | ||
| "@nestjs/platform-fastify": "^11.1.11", |
There was a problem hiding this comment.
The upgraded @nestjs/platform-fastify@11.1.11 depends on fastify@5.6.2, which is a major version upgrade from the fastify@3.12.0 that was bundled with the old version. Fastify v5 has breaking changes from v3, including changes to plugin systems, lifecycle hooks, and TypeScript types. Additionally, apollo-server-fastify@^2.21.0 (line 32) may not be compatible with Fastify v5, as it was designed for Fastify v3. You should verify compatibility or consider upgrading to a newer Apollo Server version that supports Fastify v5.
| "@nestjs/platform-fastify": "^11.1.11", | |
| "@nestjs/platform-fastify": "^7.6.18", |
Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):
package.jsonpackage-lock.jsonVulnerabilities that will be fixed with an upgrade:
SNYK-JS-NESTJSPLATFORMFASTIFY-14724255
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Time-of-check Time-of-use (TOCTOU) Race Condition