Skip to content

[Snyk] Security upgrade express from 4.22.0 to 5.1.0 - #3303

Open
lizardruss wants to merge 1 commit into
mainfrom
snyk-fix-676544fa3d96547cc462196393a180cb
Open

[Snyk] Security upgrade express from 4.22.0 to 5.1.0#3303
lizardruss wants to merge 1 commit into
mainfrom
snyk-fix-676544fa3d96547cc462196393a180cb

Conversation

@lizardruss

Copy link
Copy Markdown
Collaborator

snyk-top-banner

Snyk has created this PR to fix 2 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • examples/kind/package.json
  • examples/kind/package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
medium severity Uncaught Exception
SNYK-JS-QS-19432019
  738  
medium severity Allocation of Resources Without Limits or Throttling
SNYK-JS-QS-19432017
  708  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

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:

🦉 Allocation of Resources Without Limits or Throttling
🦉 Uncaught Exception

@lizardruss

Copy link
Copy Markdown
Collaborator Author

Merge Risk: High

The upgrade from Express v4 to v5 is a major version change with significant breaking changes that require code modifications and careful testing. The Express team provides codemods to help automate parts of the migration.

Key Breaking Changes:

  • Node.js Version: Support for Node.js versions below 18 has been dropped.
  • Removed/Renamed Methods: Several deprecated method signatures have been removed. Key examples include:
    • res.send(status, body) is removed. Use res.status(status).send(body) instead.
    • req.param(name) is removed. Use req.params, req.body, or req.query directly.
    • app.del() is removed. Use app.delete().
    • Pluralized method names like req.acceptsCharsets() must be used instead of the singular form.
  • Routing and Path Matching:
    • To mitigate security risks (ReDoS), inline regular expressions in routes like /:id(\d+) are no longer supported.
    • The syntax for optional route parameters has changed from :name? to {:name}.
  • Promise Support: Express 5 now automatically catches rejected promises from async middleware and forwards them to the error-handling middleware, which may change existing error handling logic.
  • Body Parser: The deprecated bodyParser() middleware is removed, and req.body is no longer initialized to {} by default.

Recommendation:
This is a high-risk upgrade that requires significant code review and refactoring. Before merging, run the official codemods (npx @expressjs/codemod upgrade) to automate fixes for many of the deprecated APIs. Thoroughly test your application's routing, middleware, and error handling after the upgrade.

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

@netlify

netlify Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploy Preview for devspace-docs canceled.

Name Link
🔨 Latest commit 2dcabc5
🔍 Latest deploy log https://app.netlify.com/projects/devspace-docs/deploys/6a93ea81601b7b0008a8d06d

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.

2 participants