Skip to content
PatchTempo

GUIDE · NODE.JS

Node.js 22 end of life: what to do before 30 April 2027

Node.js 22 gets security fixes until 30 April 2027. After that, the project stops patching it. You have time to move calmly, and here is what to check on the way.

GuidesPublished 8 November 2026

What changes on 1 May 2027

Nothing breaks. Your app keeps running. What stops is the fixes: a version at end of life no longer receives updates, security patches included (Node.js).

That matters more than it sounds. The security release of 21 October 2026 fixed several issues in Node.js 22, including a high-severity flaw in the Brotli decoder that can permit remote code execution, CVE-2026-111497 (Node.js). After end of life, a flaw like that stays open on Node.js 22.

Security scanners and insurance questionnaires also flag software that no longer gets fixes, so an old Node.js version tends to show up in audits.

Where does your Node.js come from?

This decides who patches it and how you upgrade. Three commands tell you most of it:

node -v
command -v node
apt-cache policy nodejs
  • A Docker image: node:22 follows the project's dates. Pin the major version in production rather than using node:lts, which points at Node.js 26 today and moves when a new LTS arrives (Docker Hub).
  • Official binaries, a version manager or a third-party repository: you follow the project's dates, and the upgrade is yours to do.
  • Linux packages: Ubuntu 24.04 ships Node.js 18 and Debian 13 ships Node.js 20 (Ubuntu, Debian). If node -v says 22 on those systems, it did not come from the system's own package. If it says 18 or 20, the project's support has ended, so check whether your distribution still patches its package.
  • A hosting platform: a setting in its dashboard or config file picks the version. Check its notice about end-of-life versions.

Which version to move to

VersionEnd of lifeWhen to choose it
Node.js 2430 Apr 2028When a dependency is not ready for 26. It has an official migration guide from 22, but you will be back here in 2028.
Node.js 2630 Apr 2029The usual target today: the current Active LTS, with the longest support.

Dates from the Node.js release schedule.

Frameworks rarely block you

  • Next.js: the current docs ask for Node.js 20.9 or newer (Next.js).
  • NestJS: apps need Node.js 20.19 or newer (22.12 or newer on the 22 line). The CLI generators need 22.22.3, 24.15 or 26 and newer (NestJS).
  • Express 5: needs Node.js 18 or newer (Express).

What breaks from 22 to 24

From the official migration guide and the 24.0.0 release notes:

  • Stricter TLS. OpenSSL 3.5 defaults to security level 2: RSA, DSA and DH keys under 2048 bits, ECC keys under 224 bits and RC4 are refused. Connections to old internal services or partners can start failing.
  • Removed APIs. tls.createSecurePair, dirent.path and fs.truncate with a file descriptor are gone.
  • New runtime warnings. url.parse(), SlowBuffer and fs.F_OK and its siblings still work but now warn. Move to the replacements when you see them.
  • Stricter behaviour. fetch(), AbortSignal validation and some stream errors are less forgiving. npm 11 comes bundled.
  • Fewer platforms. No more 32-bit Windows or 32-bit Linux armv7 builds, and macOS needs 13.5 or later.

What breaks from 24 to 26

We found no official migration guide for this step, so read the 26.0.0 release notes. The ones most likely to touch a small app:

  • http.Server.prototype.writeHeader() is removed: use writeHead().
  • The old internal stream modules (_stream_readable and similar) are removed. These usually hide in old dependencies, not in your own code.
  • module.register() now warns at runtime, which matters if you use custom loaders.
  • Undici moves to version 8, and Temporal is enabled by default.

Packages with native code

Each of these major versions changes the module version that compiled packages are built against: 137 for Node.js 24 and 147 for Node.js 26, according to their release notes. A package with compiled code, often for image processing, password hashing or database access, must be reinstalled on the new version. Addons that link directly against V8 may need a new release first (Node.js).

Upgrade steps

  1. List every place the version is set: servers, Dockerfile FROM lines, CI config, .nvmrc, the engines field in package.json and your host's settings.
  2. Update your dependencies first, still on Node.js 22, so you change one thing at a time. Look hard at any package with no release in years.
  3. Delete node_modules and reinstall with npm ci on the new version, so native packages are rebuilt.
  4. Run your tests and the app on staging with node --trace-deprecation, and read the warnings.
  5. Test every outgoing connection: databases, internal APIs, payment providers, partners. This is where stricter TLS shows up.
  6. Roll out one service at a time, with the previous image or version ready to switch back.
  7. Update engines and .nvmrc, pin the Docker image to the new major version, and watch the logs for a few days.

If you cannot upgrade in time

Commercial vendors sell security fixes for end-of-life versions, and the Node.js project itself calls that a temporary solution (Node.js). Whatever you choose, write down the date you will upgrade, reduce what is exposed to the internet and keep everything else patched.

Questions

Will my app stop working on 1 May 2027?

No. Node.js 22 keeps running. It just stops receiving fixes from the Node.js project.

Is Node.js 20 still fine?

No. It reached end of life on 30 April 2026, so move now, unless your distribution still patches its own package.

Can I go straight from 22 to 26?

Yes, you don't have to stop at 24. Read the changes for both steps, because you get all of them at once.

Can PatchTempo do the upgrade?

Yes. It is part of the one-off hardening upgrade: tested on staging, delivered as a pull request, rolled out after your approval. Start with the free audit.

Sources