Skip to content

MERN stack 2026: what changed this autumn and what to patch

Between July and November 2026, Node.js, npm, React and MongoDB all shipped a major release, a critical fix or both. Here is what changed in MongoDB, Express, React and Node.js, and the order to update them in.

Dev's Club Engineering · 12 min read
ShareShare on LinkedInX
A code editor on a dark screen showing React source code beside a project file tree.
Photo by Juanjo Jaramillo on Unsplash

If your product runs on the MERN stack in 2026, the last four months have been busy. Node.js shipped two security releases three weeks apart. npm stopped running dependency install scripts by default. React fixed a remote code execution bug in Server Components. MongoDB shipped a new major version and, six weeks later, a fix for a critical flaw in replica sets.

None of this means MERN is dying. Each layer changed in a way that affects how you upgrade, and a team that last touched its package.json in spring is now behind on at least two security fixes.

This is a layer-by-layer briefing as of November 2026. For each layer it covers what changed, whether you are actually exposed and which version to run. It ends with a checklist you can work through in an afternoon.

What changed in the MERN stack in 2026

Here is the short version, newest first:

  • MongoDB: 9.0 went GA on 28 September, and a critical replica set flaw (CVE-2026-118383) was patched on 10 November.
  • Express: no new major release. 5.x is the line to be on, and 4.x is in an awkward limbo.
  • React: 19.3 arrived on 9 September, followed by a server-side RCE fix published as CVE-2026-126187 on 10 November.
  • Node.js: 26 became LTS in October, there were security releases on 21 October and 11 November, and from Node.js 27 there is one major release per year.
  • npm: version 12 has been latest since July and blocks install scripts unless you approve them.
Diagram of the four MERN layers with the minimum version to run for each in November 2026: MongoDB 9.0.7 or 8.0.37, Express 5, React 19.3.1, Node.js 26 LTS, plus npm 12 underneath.
Minimum versions as of 23 November 2026. React's server-side fix only applies if you render React on the server.Dev's Club

Urgency differs a lot between layers. Almost everyone is exposed to the Node.js fixes. MongoDB's flaw affects self-hosted replica sets. Despite its scary headline, the React bug only reaches apps that render React on a server. Each one is explained below so you can put them in the right order.

Node.js: move to 26 LTS and take both security releases

Start with the runtime, because it touches every request you serve.

The 21 October security release fixed ten vulnerabilities across Node.js 22, 24 and 26. Top of the list is CVE-2026-111497, an out-of-bounds write in the Brotli decoder bundled with Node. According to the advisory, an attacker who can supply Brotli data that your app decompresses with node:zlib "can corrupt process memory, which can lead to a crash, disclosure of process memory, or remote code execution." If your API accepts compressed uploads or webhooks, that's you.

Three weeks later the 11 November release fixed sixteen more, mostly in HTTP/2 and TLS. These include an unauthenticated client crashing an HTTP/2 server, heap memory leaking into HTTPS response bodies, and TLS 1.2 renegotiation being used to bypass client-certificate authentication. Five of the sixteen were credited to a researcher working with Claude and Anthropic Research, which is a sign that AI-assisted bug hunting is finding real flaws in mature runtimes. Expect more security releases, not fewer.

The fixed versions are 26.13.1, 24.22.3 and 22.23.5. Anything older on those lines is missing at least one of the two batches. The advisories also state plainly that "End-of-Life versions are always affected", so a server still on Node 20 has no patch coming at all.

As for which line to choose, Node.js 26 entered LTS in October 2026 and is supported until April 2029, according to the project's revised release schedule. The same post ends the odd/even split. From Node.js 27 there is one major release each April, every release becomes LTS, and each line gets 36 months from first release to end of life. Version 27 is in a new Alpha phase now, meant for library authors and CI, "not production use". Planning upgrades just got easier: one major per year, always in April, with LTS following in October.

npm 12 stopped running install scripts

The quietest change of 2026 may break your build first. npm 12 became generally available and was tagged latest on 8 July, and GitHub's changelog lists three new defaults:

  • Dependency preinstall, install and postinstall scripts, along with implicit node-gyp builds, no longer run unless you allow them.
  • Git dependencies, direct or transitive, aren't resolved unless allowed.
  • Dependencies from remote URLs, such as tarballs over HTTPS, aren't resolved either.

This is the right call. Malicious postinstall scripts have been the delivery mechanism for one npm supply-chain attack after another. The cost lands on MERN projects that depend on native modules (bcrypt, sharp, some database drivers' optional add-ons) and suddenly install without their compiled binaries. The fix is deliberate: run npm approve-scripts --allow-scripts-pending, review the list and commit the allowlist that it writes to package.json.

If you publish internal packages, the same changelog says 2FA-bypass tokens are expected to lose direct publishing around January 2027. They will only be able to stage a publish that a human approves with 2FA. Move CI publishing to trusted publishing (OIDC) now rather than in a January rush.

React 19.3 and the Server Components flaw

React 19.3 shipped on 9 September with two long-running experiments marked stable: <ViewTransition> for animating elements as they enter, leave or move, and Fragment Refs. It also added Trusted Types support and a browser() helper that keeps a component out of server rendering. None of it forces a rewrite, and the release post lists no breaking changes.

The security story needs more care. CVE-2026-126187 is an unauthenticated RCE in the React Server Components transport, published on 10 November. According to StepSecurity's analysis, it affects react-server-dom-webpack, react-server-dom-parcel and react-server-dom-turbopack before 19.0.9, 19.1.10, 19.2.9 and 19.3.1. Triggering it requires a response that carries multiple typed arrays plus an attacker-controlled value, which is unusual.

Many MERN guides skip the next point. A classic MERN app, with a React SPA built by Vite and talking to an Express JSON API, does not use Server Components and is not affected. StepSecurity says the same thing: client-only React apps with no RSC-capable framework or bundler plugin are out of scope.

Teams that moved their front end to Next.js are in a different position. Next.js released 16.4.1 and 15.5.28 on 14 October, well before the CVE record appeared. Those versions fix this issue (rated critical where a use cache function returns multiple typed arrays), a second critical RCE in image optimisation for SVGs on glibc-based Linux, and a Server Actions denial of service. The Next.js team's advice is to "upgrade immediately even if your application does not have similar functions."

Express 5 is the line to be on

Express hasn't made headlines this year, which makes it easy to forget. When 5.1 became the default on npm, the maintainers published a support schedule that put 4.x into maintenance from April 2025 with an end of life "no sooner than" 1 October 2026. That date has passed without a firm cut-off, and the post calls its dates "goals not commitments". In practice, 4.x is living on goodwill and could stop receiving fixes at short notice.

Two changes in Express 5 make the move worth doing for reasons beyond support status. First, a rejected promise in async middleware now reaches your error handler, so a missed try/catch no longer means an unhandled rejection. Second, the router dropped regex sub-expressions such as /:id(\\d+) to remove a class of ReDoS bugs. That second change is also where most migration work goes: optional parameters become {/:param}, wildcards must be named (/*path) and unnamed req.params[0] is gone. On a typical API, budget a day for routes and tests rather than a sprint.

MongoDB 9.0, a critical CVE and Mongoose 9

MongoDB's news split in two this autumn.

The urgent part is CVE-2026-118383, a use-after-free in replica set catch-up that unauthenticated attackers can trigger. It is rated 9.5 on CVSS 4.0. Datadog's write-up lists the fixed versions as 9.0.7, 8.3.16, 8.0.37, 7.0.48, 6.0.30, 5.0.35 and 4.4.32. Standalone mongod instances are not affected. Atlas clusters are patched automatically during maintenance, so if you have deferred maintenance windows, stop deferring. If you self-host a replica set on EC2 or in Kubernetes, patch every member, including any that were offline, and confirm that MongoDB is not reachable from the public internet.

The planned part is MongoDB 9.0, generally available since 28 September 2026. Two changes matter for typical MERN apps. A single query operation is now capped at 1 GB or 20% of server memory, whichever is greater, and fails with ExceededMemoryLimit beyond that, so audit any aggregation pipeline that sorts or groups large collections in memory. And $where, $function and $accumulator are no longer deprecated, running on a WebAssembly-based engine instead.

Read the known issues before you upgrade. On 9.0, listIndexes reports a simple collation that can make Mongoose's syncIndexes() drop and rebuild indexes that haven't changed. MongoDB's fix is to run Mongoose 9.10.4 or 8.24.5, or stop calling syncIndexes() at startup. On a large collection, an unexpected index rebuild on deploy is an outage.

That leads to Mongoose 9. The migration guide lists breaking changes that touch everyday code: pre middleware no longer receives next() (use async functions), update pipelines throw unless you opt in with updatePipeline: true, the FilterQuery type is now QueryFilter, and Mongoose 9 requires Node.js 20.19.0 or later. If you're already on Node 26, the last point is settled.

user.model.ts
// Mongoose 8 style: breaks in Mongoose 9
// userSchema.pre("save", function (next) { hash(this).then(() => next()); });

// Mongoose 9: async middleware, no next()
userSchema.pre("save", async function () {
  if (this.isModified("password")) {
    this.password = await hashPassword(this.password);
  }
});

Is the MERN stack still a good choice in 2026?

Yes, for the right product, and this autumn's changes are a reason for confidence rather than doubt. Every layer has active maintainers, published support windows and fast security responses. That is what you want from a stack you will run for years.

Choose MERN when your data is document-shaped (product catalogues, user-generated content, event logs, AI chat histories), your team works in TypeScript end to end and you want one language from database queries to UI. We built Roach.ai, an eCommerce research tool with an AI coach, on React, Next.js, Node.js and MongoDB, and Kyvox Flow, a diamond-industry ERP, on React, Node.js and MongoDB, so we've seen it hold up both for a SaaS product and for operations software.

Think twice when your core data is highly relational, as with accounting ledgers, complex reporting across many joined entities or strict multi-row integrity. A relational database fits that more naturally, and keeping React and Node.js with Postgres underneath is a common, sensible variant. Also be wary of the "classic MERN" template that bundles a client-rendered SPA with an Express API when search traffic matters. For marketing and content pages, server rendering through a framework like Next.js gives you indexable HTML. The trade-off is the server-side attack surface described above, which needs patching.

Your MERN stack upgrade checklist

Work through this in order. The first three items address active risk, and the rest is maintenance you can schedule.

  1. Node.js: run 26.13.1+, 24.22.3+ or 22.23.5+ everywhere, including Docker base images and CI. Plan to move to 26 if you're on 22.
  2. MongoDB: on self-hosted replica sets, upgrade every member to a fixed release (9.0.7, 8.0.37 and so on). On Atlas, apply any pending maintenance.
  3. Next.js, if you use it: upgrade to 16.4.1 or 15.5.28 or later, then rebuild and redeploy.
  4. npm 12: upgrade npm locally and in CI, run npm approve-scripts --allow-scripts-pending, review the scripts and commit the allowlist.
  5. Express: plan the 4 → 5 migration. Rewrite regex routes and named wildcards first, then remove the try/catch wrappers you no longer need.
  6. Mongoose: before upgrading the server to MongoDB 9.0, move to Mongoose 9.10.4 (or 8.24.5) and convert callback-style pre hooks.
  7. React: move to 19.3.1 when convenient. For SPAs this is routine rather than urgent.

To see where you stand, start with these commands:

mern-audit.sh
node --version     # want v26.13.1+, v24.22.3+ or v22.23.5+
npm --version      # 12.x: dependency install scripts need approval
npm ls express mongoose next react react-dom
npm ls react-server-dom-webpack react-server-dom-turbopack react-server-dom-parcel
mongosh "$MONGODB_URI" --quiet --eval 'db.version()'

If that audit turns up an Express 4 app on Node 20 with an unpatched replica set, the job is bigger than an afternoon but still well understood. Taking over and modernising existing JavaScript codebases is a regular part of our web development work, and where the work touches payments or third-party APIs, our system integration team handles that side. Either way, the first step is the same: run the five commands above and update Node.js today.

Sources

  1. Wednesday, October 21, 2026 Security Releases, Node.js, Oct 21, 2026
  2. Wednesday, November 11, 2026 Security Releases, Node.js, Nov 11, 2026
  3. Evolving the Node.js Release Schedule, Node.js, Mar 10, 2026
  4. npm install-time security and GAT bypass2fa deprecation, GitHub Changelog, Jul 8, 2026
  5. React 19.3, React, Sep 9, 2026
  6. CVE-2026-126187: React Server Components Flaw Lets Attackers Execute Code Through Smuggled Flight Rows, StepSecurity, Nov 12, 2026
  7. Next.js Security Update for Upstream Vulnerabilities, Next.js, Oct 14, 2026
  8. Express@5.1.0: Now the Default on npm with LTS Timeline, Express, Mar 31, 2025
  9. Introducing Express v5: A New Era for the Node.js Framework, Express, Oct 15, 2024
  10. Release Notes for MongoDB 9.0, MongoDB
  11. CVE-2026-118383: MongoDB Server use-after-free, Datadog Security Labs, Nov 11, 2026
  12. Migrating from 8.x to 9.x, Mongoose
  • #mern
  • #nodejs
  • #react
  • #mongodb
  • #express
Written byDev's Club Engineering

The team behind real-time auction platforms, SaaS products and ERPs for clients in Europe, the US and India.

Have an idea? Let's build it.

Start a project