What changed in express from 4 to 5
4 releases numbered after v4.22.2 up to and including v5.2.1, stable releases only. v4.22.2 and v5.2.1 are the newest stable releases of 4 and 5 we track; this page follows them as new ones ship.
- 3 CVEs mentioned
- 1 mentions breaking changes
- 2 remove or deprecate something
25 changes across 4 releases
- Add support for ETag option in res.sendFile
- Simplify acceptsLanguages implementation using spread operator
- Use req.socket over deprecated req.connection
- Use node protocol for querystring
- Enforce explicit Buffer import and add lint rule
- Use cached slice in app.listen
- Use loop for acceptParams
- Simplify normalizeTypes function
- Extend res.links() to allow adding multiple links with the same rel
- Update body-parser to ^2.1.0
- Update router to ^2.1.0
- Update debug to ^4.4.0
- Update qs to ^6.14.0
- Update finalhandler to 2.1.0
- Remove Object.setPrototypeOf polyfill
- Replace methods dependency with standard library
- Remove utils-merge dependency and use spread syntax instead
- Remove unused depd dependency
- Add deprecation warnings for redirect arguments undefined
Original release notes, newest first
The list above is our reading of these notes; the originals from express are here, one fold per release.
v5.2.1
What's Changed
[!IMPORTANT]
The prior release (5.2.0) included an erroneous breaking change related to the extended query parser. There is no actual security vulnerability associated with this behavior (CVE-2024-51999 has been rejected). The change has been fully reverted in this release.
- Release: 5.2.1 by @UlisesGascon in https://github.com/expressjs/express/pull/6933
Full Changelog: https://github.com/expressjs/express/compare/v5.2.0...v5.2.1
v5.2.0
Important: Security
- Security fix for CVE-2024-51999 (GHSA-pj86-cfqh-vqx6)
What's Changed
- build(deps): bump github/codeql-action from 3.28.11 to 3.28.13 by @dependabot[bot] in https://github.com/expressjs/express/pull/6429
- Refactor: simplify
acceptsLanguagesimplementation using spread operator by @Ayoub-Mabrouk in https://github.com/expressjs/express/pull/6137 - increased code coverage of utils.js file by @ashish3011 in https://github.com/expressjs/express/pull/6386
- chore: remove duplicate word by @dufucun in https://github.com/expressjs/express/pull/6456
- build(deps): bump github/codeql-action from 3.28.13 to 3.28.16 by @dependabot[bot] in https://github.com/expressjs/express/pull/6498
- build(deps): bump actions/setup-node from 4.3.0 to 4.4.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6497
- build(deps): bump actions/download-artifact from 4.2.1 to 4.3.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6496
- ci: add node.js 24 to test matrix by @Phillip9587 in https://github.com/expressjs/express/pull/6504
- ci: update codeql config by @Phillip9587 in https://github.com/expressjs/express/pull/6488
- chore: wider range for query test skip by @jonchurch in https://github.com/expressjs/express/pull/6512
- chore: fix typos in test by @noritaka1166 in https://github.com/expressjs/express/pull/6535
- ci: disable credential persistence for checkout actions by @mertssmnoglu in https://github.com/expressjs/express/pull/6522
- ci: allow manual triggering of workflow by @shivarm in https://github.com/expressjs/express/pull/6515
- test: add coverage for app.listen() variants by @kgarg1 in https://github.com/expressjs/express/pull/6476
- docs: move documentation and charters to the discussions and .github … by @bjohansebas in https://github.com/expressjs/express/pull/6427
- build(deps): bump github/codeql-action from 3.28.16 to 3.28.18 by @dependabot[bot] in https://github.com/expressjs/express/pull/6549
- build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2 by @dependabot[bot] in https://github.com/expressjs/express/pull/6548
- chore: enforce explicit
Bufferimport and add lint rule by @shivarm in https://github.com/expressjs/express/pull/6525 - chore: use node protocol for querystring by @shivarm in https://github.com/expressjs/express/pull/6520
- chore: fix typo by @mountdisk in https://github.com/expressjs/express/pull/6609
- build(deps): bump github/codeql-action from 3.28.18 to 3.29.2 by @dependabot[bot] in https://github.com/expressjs/express/pull/6618
- add deprecation warnings for redirect arguments undefined by @bjohansebas in https://github.com/expressjs/express/pull/6405
- ci: run CI when the markdown changes by @bjohansebas in https://github.com/expressjs/express/pull/6632
- doc: fix CONTRIBUTING link by @jonchurch in https://github.com/expressjs/express/pull/6653
- doc: update contributing guidelines and code of conduct links by @ShubhamOulkar in https://github.com/expressjs/express/pull/6601
- build(deps-dev): bump morgan from 1.10.0 to 1.10.1 by @dependabot[bot] in https://github.com/expressjs/express/pull/6679
- build(deps-dev): bump cookie-session from 2.1.0 to 2.1.1 by @dependabot[bot] in https://github.com/expressjs/express/pull/6678
- lint: add --fix flag to automatic fix linting issue by @shivarm in https://github.com/expressjs/express/pull/6644
- chore: ignore yarn.lock file and update example by @shivarm in https://github.com/expressjs/express/pull/6588
- lib: use req.socket over deprecated req.connection by @bjohansebas in https://github.com/expressjs/express/pull/6705
- doc: update express app example by @shivarm in https://github.com/expressjs/express/pull/6718
- build(deps): bump github/codeql-action from 3.29.2 to 3.29.5 by @dependabot[bot] in https://github.com/expressjs/express/pull/6675
- Remove history.md from being packaged on publish by @sheplu in https://github.com/expressjs/express/pull/6780
- build(deps): bump actions/checkout from 4.2.2 to 5.0.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6797
- build(deps): bump github/codeql-action from 3.29.7 to 3.30.5 by @dependabot[bot] in https://github.com/expressjs/express/pull/6796
- build(deps): bump ossf/scorecard-action from 2.4.2 to 2.4.3 by @dependabot[bot] in https://github.com/expressjs/express/pull/6795
- build(deps): bump actions/setup-node from 4.4.0 to 5.0.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6794
- build(deps): bump actions/download-artifact from 4.3.0 to 5.0.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6793
- ci: add node.js 25 to test matrix by @Phillip9587 in https://github.com/expressjs/express/pull/6843
- build(deps): bump actions/download-artifact from 5.0.0 to 6.0.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6871
- build(deps): bump actions/setup-node from 5.0.0 to 6.0.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6870
- build(deps): bump github/codeql-action from 3.30.5 to 4.31.2 by @dependabot[bot] in https://github.com/expressjs/express/pull/6869
- build(deps): bump actions/upload-artifact from 4.6.2 to 5.0.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6868
- chore: switch badges from badgen.net to shields.io by @Phillip9587 in https://github.com/expressjs/express/pull/6900
- refactor: use cached slice in app.listen by @Tacit1 in https://github.com/expressjs/express/pull/6897
- Nominate to @efekrskl for triage team by @bjohansebas in https://github.com/expressjs/express/pull/6888
- docs: update emeritus triagers by @bjohansebas in https://github.com/expressjs/express/pull/6890
- fix: upgrade body-parser to 2.2.1 to address CVE-2025-13466 by @shivarm in https://github.com/expressjs/express/pull/6922
- build(deps): bump coverallsapp/github-action from 2.3.6 to 2.3.7 by @dependabot[bot] in https://github.com/expressjs/express/pull/6930
- build(deps): bump github/codeql-action from 4.31.2 to 4.31.6 by @dependabot[bot] in https://github.com/expressjs/express/pull/6929
- build(deps): bump actions/checkout from 5.0.0 to 6.0.0 by @dependabot[bot] in https://github.com/expressjs/express/pull/6928
- Release: 5.2.0 by @UlisesGascon in https://github.com/expressjs/express/pull/6920
New Contributors
- @ashish3011 made their first contribution in https://github.com/expressjs/express/pull/6386
- @dufucun made their first contribution in https://github.com/expressjs/express/pull/6456
- @noritaka1166 made their first contribution in https://github.com/expressjs/express/pull/6535
- @mertssmnoglu made their first contribution in https://github.com/expressjs/express/pull/6522
- @shivarm made their first contribution in https://github.com/expressjs/express/pull/6515
- @kgarg1 made their first contribution in https://github.com/expressjs/express/pull/6476
- @mountdisk made their first contribution in https://github.com/expressjs/express/pull/6609
- @ShubhamOulkar made their first contribution in https://github.com/expressjs/express/pull/6601
- @sheplu made their first contribution in https://github.com/expressjs/express/pull/6780
- @Tacit1 made their first contribution in https://github.com/expressjs/express/pull/6897
Full Changelog: https://github.com/expressjs/express/compare/v5.1.0...v5.2.0
v5.1.0
What's Changed
- Update captains by @UlisesGascon in https://github.com/expressjs/express/pull/6027
- build: Node.js 23.0 by @bjohansebas in https://github.com/expressjs/express/pull/6075
- Add funding field (v5) by @bjohansebas in https://github.com/expressjs/express/pull/6064
- ✅ add discarded middleware test by @ctcpip in https://github.com/expressjs/express/pull/5819
- update homepage link http to https by @bjohansebas in https://github.com/expressjs/express/pull/5920
- Improve readme by @bjohansebas in https://github.com/expressjs/express/pull/5994
- Add bjohansebas as repo captain for expressjs.com by @crandmck in https://github.com/expressjs/express/pull/6058
- Remove Object.setPrototypeOf polyfill by @Phillip9587 in https://github.com/expressjs/express/pull/6081
- fix(buffer): use node:buffer instead of safe-buffer by @bhavya3024 in https://github.com/expressjs/express/pull/6071
- docs: Add DCO by @UlisesGascon in https://github.com/expressjs/express/pull/6048
- cleanup: remove promise support check from tests by @Phillip9587 in https://github.com/expressjs/express/pull/6148
- Use loop for acceptParams by @blakeembrey in https://github.com/expressjs/express/pull/6066
- Improve documentation step in release process by @bjohansebas in https://github.com/expressjs/express/pull/6150
- cleanup: remove unnecessary require for global Buffer by @Phillip9587 in https://github.com/expressjs/express/pull/6146
- cleanup: remove AsyncLocalStorage check by @Phillip9587 in https://github.com/expressjs/express/pull/6147
- update history.md for acceptParams change by @jonchurch in https://github.com/expressjs/express/pull/6177
- docs: add @rxmarbles to the triage team by @UlisesGascon in https://github.com/expressjs/express/pull/6151
- refactor: improve readability by @sazk07 in https://github.com/expressjs/express/pull/6173
- docs: clarify the security process in the triage role by @bjohansebas in https://github.com/expressjs/express/pull/6217
- chore: replace
methodsdependency with standard library by @jonkoops in https://github.com/expressjs/express/pull/6196 - Remove
utils-mergedependency - use spread syntax instead by @Phillip9587 in https://github.com/expressjs/express/pull/6091 - fix(securite): fix vulnerabilities by @Abdel-Monaam-Aouini in https://github.com/expressjs/express/pull/6211
- refactor: prefix built-in node module imports by @slagiewka in https://github.com/expressjs/express/pull/6236
- fix: remove download size badges by @wesleytodd in https://github.com/expressjs/express/pull/6266
- Remove unused
depddependency by @jonkoops in https://github.com/expressjs/express/pull/6197 - fix: usage of
Invalid action input 'persist-credentials'foractions/setup-node@v4inci.ymlby @hamirmahal in https://github.com/expressjs/express/pull/6256 - Add support for OSSF scorecard reporting by @UlisesGascon in https://github.com/expressjs/express/pull/5431
- docs: add @Phillip9587 to the triage team by @bjohansebas in https://github.com/expressjs/express/pull/6276
- fix: added a missing semicolon in css styles in examples/auth by @pr4j3sh in https://github.com/expressjs/express/pull/6297
- docs: include team email in the security policy by @UlisesGascon in https://github.com/expressjs/express/pull/6278
- refactor: simplify
normalizeTypesfunction by @Ayoub-Mabrouk in https://github.com/expressjs/express/pull/6097 - ci: updated github actions ci workflow by @Phillip9587 in https://github.com/expressjs/express/pull/6314
- ci: fix npm install --include typo by @Phillip9587 in https://github.com/expressjs/express/pull/6324
- ci: updated scorecard actions by @Phillip9587 in https://github.com/expressjs/express/pull/6322
- build(deps): use carat notation for dependency versions by @dpopp07 in https://github.com/expressjs/express/pull/6317
- chore(deps): update
debugto ^4.4.0 by @Phillip9587 in https://github.com/expressjs/express/pull/6313 - docs: retroactively note 5.0.0-beta.1 api change in history file by @dpopp07 in https://github.com/expressjs/express/pull/6333
- feat(deps): body-parser@^2.1.0 by @wesleytodd in https://github.com/expressjs/express/pull/6332
- feat(deps): router@^2.1.0 by @wesleytodd in https://github.com/expressjs/express/pull/6331
- Update repo captains by @UlisesGascon in https://github.com/expressjs/express/pull/6234
- deps: upgrade nyc by @agungjati in https://github.com/expressjs/express/pull/6122
- fix (deps): update deps by @wesleytodd in https://github.com/expressjs/express/pull/6337
- response: add support for ETag option in res.sendFile by @juanarbol in https://github.com/expressjs/express/pull/6073
- Update multiple links to use
httpsinstead ofhttpby @Phillip9587 in https://github.com/expressjs/express/pull/6338 - Extend res.links() to allow adding multiple links with the same rel #2729 by @andvea in https://github.com/expressjs/express/pull/4885
- docs: update emeritus triagers by @UlisesGascon in https://github.com/expressjs/express/pull/6345
- docs: update guidance for triager nominations by @bjohansebas in https://github.com/expressjs/express/pull/6349
- docs: clarify guidelines for becoming a committer by @bjohansebas in https://github.com/expressjs/express/pull/6364
- Nominate @dpopp07 to the triage team by @UlisesGascon in https://github.com/expressjs/express/pull/6352
- fix(deps): qs@^6.14.0 by @wesleytodd in https://github.com/expressjs/express/pull/6374
- Add dependabot by @UlisesGascon in https://github.com/expressjs/express/pull/5435
- fix dependabot config by @bjohansebas in https://github.com/expressjs/express/pull/6392
- build(deps): bump github/codeql-action from 3.24.7 to 3.28.11 by @dependabot in https://github.com/expressjs/express/pull/6398
- build(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 by @dependabot in https://github.com/expressjs/express/pull/6397
- feat(deps): finalhandler@2.1.0 by @wesleytodd in https://github.com/expressjs/express/pull/6373
- build(deps-dev): bump cookie-session from 2.0.0 to 2.1.0 by @dependabot in https://github.com/expressjs/express/pull/6399
- deps: body-parser@^2.2.0 by @UlisesGascon in https://github.com/expressjs/express/pull/6419
- deps: type-is@^2.0.1 by @UlisesGascon in https://github.com/expressjs/express/pull/6420
- deps: router@^2.2.0 by @UlisesGascon in https://github.com/expressjs/express/pull/6417
- ci: use full SHAs for github action versions by @Phillip9587 in https://github.com/expressjs/express/pull/6415
- doc: remove @mertcanaltin from Triagers by @mertcanaltin in https://github.com/expressjs/express/pull/6408
- deps: serve-static@^2.2.0 by @UlisesGascon in https://github.com/expressjs/express/pull/6418
- 5.1.0 by @wesleytodd in https://github.com/expressjs/express/pull/6425
New Contributors
- @bhavya3024 made their first contribution in https://github.com/expressjs/express/pull/6071
- @jonkoops made their first contribution in https://github.com/expressjs/express/pull/6196
- @Abdel-Monaam-Aouini made their first contribution in https://github.com/expressjs/express/pull/6211
- @slagiewka made their first contribution in https://github.com/expressjs/express/pull/6236
- @hamirmahal made their first contribution in https://github.com/expressjs/express/pull/6256
- @pr4j3sh made their first contribution in https://github.com/expressjs/express/pull/6297
- @Ayoub-Mabrouk made their first contribution in https://github.com/expressjs/express/pull/6097
- @dpopp07 made their first contribution in https://github.com/expressjs/express/pull/6317
- @agungjati made their first contribution in https://github.com/expressjs/express/pull/6122
- @andvea made their first contribution in https://github.com/expressjs/express/pull/4885
- @dependabot made their first contribution in https://github.com/expressjs/express/pull/6398
Full Changelog: https://github.com/expressjs/express/compare/5.0.1...v5.1.0
v5.0.15.0.1
What's Changed
- remove --bail from test script by @jonchurch in https://github.com/expressjs/express/pull/5962
- Nominate @bjohansebas to the triage team by @UlisesGascon in https://github.com/expressjs/express/pull/6009
- Link and update captains by @blakeembrey in https://github.com/expressjs/express/pull/6013
- Update
cookiesemver lock to address CVE-2024-47764 by @joshbuker in https://github.com/expressjs/express/pull/6017 - Release: 5.0.1 by @UlisesGascon in https://github.com/expressjs/express/pull/6032
Full Changelog: https://github.com/expressjs/express/compare/v5.0.0...5.0.1