Skip to content

chore: fixed vulneribilities#13

Open
contentstackMridul wants to merge 2 commits intomainfrom
vul_fix_12_02_2026
Open

chore: fixed vulneribilities#13
contentstackMridul wants to merge 2 commits intomainfrom
vul_fix_12_02_2026

Conversation

@contentstackMridul
Copy link
Contributor

@contentstackMridul contentstackMridul commented Feb 15, 2026

Summary

  • Upgraded fastify from ^4.21.0 to ^5.7.4 to address known vulnerabilities in the v4 release line
  • Upgraded all companion @fastify/* plugins and fastify-plugin to their Fastify v5-compatible major versions, as the v4-era plugins declare fastify: '4.x' in their metadata and are rejected at startup by Fastify v5 (FST_ERR_PLUGIN_VERSION_MISMATCH)
Package Before After
fastify ^4.21.0 ^5.7.4
@fastify/cors ^8.3.0 ^11.0.0
@fastify/rate-limit ^9.1.0 ^10.0.0
@fastify/swagger ^8.8.0 ^9.0.0
@fastify/swagger-ui ^3.0.0 ^5.0.0
fastify-plugin ^4.5.1 ^5.0.0

No source code changes were required -- all existing API patterns (.listen() signature, JSON schemas, logger config, reply handling) were already compatible with Fastify v5.

Note: @fastify/cors v11 changed default allowed methods to GET,HEAD,POST (previously all methods). This has no impact on our current routes (all GET/POST), but any future PUT/PATCH/DELETE routes will require explicit methods configuration in the CORS options.

Test Plan

  • Server boots without errors
  • All existing endpoints respond correctly (/health, /health/views, /sync-github-repo, /get-preview-data)
  • Swagger UI loads at /documentation
  • All 15 unit tests pass
  • npm audit reports 0 vulnerabilities

@contentstackMridul contentstackMridul requested a review from a team as a code owner February 15, 2026 18:28
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.

1 participant