unstale

npm / express

express

What changed in express 4 to 5, from its official release notes, upgrade guides and advisories. Also covers @types/express. Sources checked 2026-11-30.

37 breaking4 security1 deprecations1 new APIs and options12 behavior and defaults1 tooling6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

express 560 changes

Breaking changes 36

  • Invalid limit values now throw during parser initialization instead of being ignored, preventing request body size enforcement from being silently disabled.

    5.3.0release notes

  • Valid HTTP-token file names are no longer quoted in the Content-Disposition header; applications asserting exact header bytes may need to update expectations.

    5.3.0release notes

  • Express 5 no longer supports app.del(); use app.delete() to register HTTP DELETE routes.

    5.0.0upgrade guide

  • The app.param(fn) signature is no longer supported; it had been deprecated since v4.11.0.

    5.0.0upgrade guide

  • Deprecated API method signatures from Express v3 and v4 have been removed.

    5.0.0release notes

  • The dotfiles option now defaults to ignore, so hidden files and directories are not served unless explicitly allowed.

    5.0.0upgrade guide

  • The from option is no longer supported; use root instead.

    5.0.0upgrade guide

  • The hidden option is no longer supported; use dotfiles instead.

    5.0.0upgrade guide

  • mime is no longer exported on express.static; use the mime-types package to work with MIME type values.

    5.0.0upgrade guide

  • The extended option now defaults to false; explicitly set it to true if the application relies on extended parsing.

    5.0.0upgrade guiderelease notes

  • Express 5 requires Node.js version 18 or higher.

    5.0.0upgrade guiderelease notes

  • Route wildcards must be named, optional segments use braces instead of ?, regexp characters are unsupported, reserved characters must be escaped, and parameter names can be valid JavaScript identifiers or quoted.

    5.0.0upgrade guide

  • Routing uses path-to-regexp@8.x, which removes sub-expression regex patterns to mitigate ReDoS.

    5.0.0release notes

  • The singular method is no longer supported; use req.acceptsCharsets().

    5.0.0upgrade guide

  • The singular method is no longer supported; use req.acceptsEncodings().

    5.0.0upgrade guide

  • The singular method is no longer supported; use req.acceptsLanguages().

    5.0.0upgrade guide

  • req.body is undefined when the request body has not been parsed; it previously returned an empty object.

    5.0.0upgrade guide

  • req.param(name) has been removed; read submitted values from req.params, req.body, or req.query instead.

    5.0.0upgrade guide

  • For string paths, req.params has a null prototype; wildcard captures are arrays and unmatched parameters are omitted. Regexp paths still produce a standard object.

    5.0.0upgrade guide

  • req.query is now a getter rather than a writable property, and the default query parser changes from extended to simple.

    5.0.0upgrade guide

  • res.clearCookie ignores user-provided maxAge and expires options.

    5.0.0upgrade guiderelease notes

  • The res.json(obj, status) signature is unsupported; set the status with res.status(status).json(obj).

    5.0.0upgrade guide

  • The res.jsonp(obj, status) signature is unsupported; set the status with res.status(status).jsonp(obj).

    5.0.0upgrade guide

  • The magic string back is no longer supported; use req.get('Referrer') || '/' to refer to the previous page.

    5.0.0upgrade guide

  • The magic string back is no longer supported; use req.get('Referrer') || '/' to redirect to the previous page.

    5.0.0upgrade guide

  • The status and URL arguments are now ordered as res.redirect(status, url).

    5.0.0upgrade guide

  • res.render now enforces asynchronous behavior for all view engines, avoiding bugs from synchronous implementations that violate the recommended interface.

    5.0.0upgrade guide

  • The res.send(obj, status) signature is unsupported; set the status with res.status(status).send(obj).

    5.0.0upgrade guide

  • Passing a number as the sole argument is unsupported; use res.sendStatus(statusCode) to set the status and send its text.

    5.0.0upgrade guide

  • The lowercase method has been replaced by res.sendFile().

    5.0.0upgrade guide

  • The from option is no longer supported; use root instead.

    5.0.0upgrade guide

  • The hidden option is no longer supported; use dotfiles instead.

    5.0.0upgrade guide

  • res.status accepts only integer status codes from 100 to 999 and errors when the code is not an integer.

    5.0.0upgrade guiderelease notes

  • res.vary throws an error when the field argument is missing; it previously logged a warning.

    5.0.0upgrade guide

  • The router.param(fn) signature is no longer supported; it had been deprecated since v4.11.0.

    5.0.0upgrade guide

  • router.param(name, fn) no longer accepts an array of names; register each name with its own call.

    5.0.0upgrade guide

Security 4

  • Upgraded to fix CVE-2026-90711.

    5.3.0release notes

  • Upgraded to fix arrayLimit bypasses in comma parsing and a denial of service via an attacker-controlled isBuffer.

    5.3.0release notes

  • body-parser was upgraded to 2.2.1 to address CVE-2025-13466.

    5.2.0release notes

  • A security fix addresses CVE-2024-51999.

    4.22.0, 5.2.0release notesrelease notes

Deprecations 1

  • Deprecation warnings are now emitted for redirect arguments that are undefined.

    5.2.0release notes

New APIs and options 1

  • The urlencoded body parser now allows its body depth to be customized.

    5.0.0release notes

Behavior and default changes 11

  • Now logs the full error object instead of only its stack trace, retaining nested details such as Error.cause and library-specific properties.

    5.3.0release notes

  • Freshness validation now includes QUERY requests, allowing matching conditional validators to produce 304 responses.

    5.3.0release notes

  • HTML-format redirect responses now include a doctype, title, and body for better browser compatibility.

    5.3.0release notes

  • When supplied, the callback is invoked on server error and receives the error as an argument instead of the error being thrown.

    5.0.0upgrade guiderelease notes

  • A leading colon in the name is silently ignored; the name is used without the colon prefix.

    5.0.0upgrade guide

  • express.json(), express.urlencoded(), express.text(), and express.raw() now decompress incoming request bodies encoded with Brotli, in addition to gzip and deflate.

    5.0.0upgrade guide

  • express.static() and res.sendFile() now serve .js files as text/javascript instead of application/javascript.

    5.0.0upgrade guide

  • Rejected promises returned by middleware and handlers are forwarded as Errors to error-handling middleware, making async handlers usable without manually catching errors.

    5.0.0upgrade guiderelease notes

  • The port number is now preserved in req.host.

    5.0.0upgrade guide

  • The dotfiles check also covers hidden directories in the evaluated path; hidden directories may require dotfiles: 'allow'.

    5.0.0upgrade guide

  • Router debug logs use the router, router:layer, and router:route namespaces; include router namespaces in DEBUG settings to see them.

    5.0.0upgrade guide

Tooling 1

  • A codemod recipe can automatically update an Express server to the latest version.

    5.0.0upgrade guide

Fixes and other changes 6

  • Passing null as options now handles the locals object correctly and behaves like omitting options or passing an empty object.

    5.3.0release notes

  • Only adds Content-Length when Transfer-Encoding is absent, preventing conflicting response headers; ETag generation is unaffected by Transfer-Encoding.

    5.3.0release notes

  • When adding a charset, existing Content-Type parameters are preserved, and a Content-Type that fails to parse no longer throws.

    5.3.0release notes

  • Avoids duplicate Content-Type header processing when sending string responses without an explicit Content-Type header.

    5.3.0release notes

  • The breaking change to the extended query parser introduced in 5.2.0 was fully reverted.

    4.22.1, 5.2.1release notesrelease notes

  • The app.router object is available again as a reference to the base Express router.

    5.0.0upgrade guide

express 42 changes

Breaking changes 1

  • Method functions called without a path now error.

    4.22.0release notes

Behavior and default changes 1

  • Repeated-key arrays can contain more than 20 items, and indexed notation now allows up to 1000 items, unifying array-cap behavior across notations.

    4.22.2release notes