The short answer
A Node.js version upgrade from 18 or 20 is overdue: both lines are past end of life. Node.js 18 stopped receiving fixes on 30 April 2025 and Node.js 20 on 30 April 2026, according to the Node.js release schedule. Move to Node.js 24 unless a dependency blocks it. Node.js 24 (Krypton) is an LTS line supported until 30 April 2028. Node.js 22 (Jod) is a valid stepping stone, but it is already in maintenance and reaches end of life on 30 April 2027, about six months from now.
Not upgrading this quarter? Node.js extended support for 18 and 20: OSSeva patches Node.js 14 to 20 runtimes while you move to a current LTS line, and Node.js end-of-life dates lists every line with the date it was checked.
Most applications need three kinds of work: replacing a short list of removed or deprecated APIs (the Node.js project publishes codemods for most of them), rebuilding native add-ons, and checking TLS keys and certificates against the stricter OpenSSL defaults in Node.js 24. The rest of this guide covers each one.
Running Node.js in production? OSSeva patches and supports it, end-of-life versions included.
Node.js extended support: what is coveredNode.js 20 end of life: what to do now
Node.js 20 reached end of life on 30 April 2026. Its last release, 20.20.2, shipped on 24 March 2026 according to the nodejs.org distribution index, and the Node.js release policy counts as supported only the lines that are not End-of-Life. A Node.js 20 service keeps running, but the Node.js project no longer ships fixes for it. Work through it in this order:
The Node.js LTS schedule shows when each line moves to maintenance.
- Find every Node.js 20 runtime, including the managed ones. Containers, CI images,
.nvmrcfiles and serverless settings each hold their own version. On AWS Lambda thenodejs20.xruntime was deprecated on 30 April 2026. AWS lists 29 July 2027 as the date function creation is blocked and 31 August 2027 as the date updates are blocked, and its policy says that after deprecation it may no longer apply security patches and affected functions are not eligible for technical support. - Rank them by exposure. Internet-facing services, anything that parses untrusted input and anything that touches authentication or payments move first. An internal batch job can wait behind them.
- Pick the target by date, not habit. Node.js 22 ends on 30 April 2027, so moving a Node.js 20 service there buys about six months of fixes. Node.js 24 ends on 30 April 2028. Use 24 unless a dependency blocks it.
- Ship the code changes before the runtime. The codemods and replacements in the breaking changes table work on the old runtime too, so they can go out first and leave the runtime switch as a small, reversible change.
- For anything that cannot move yet, write the exception and get a source of fixes. A time-boxed exception with tested compensating controls is what an auditor expects to see (our guide to documenting end-of-life software risk has the fields). Compensating controls do not remove the vulnerability, so pair the exception with a supported build as described at the end of this article.
| Where Node.js runs | Node.js 20 | Node.js 22 | Node.js 24 |
|---|---|---|---|
| Node.js project end of life | 30 Apr 2026 | 30 Apr 2027 | 30 Apr 2028 |
| AWS Lambda runtime deprecation | nodejs20.x: 30 Apr 2026 | nodejs22.x: 30 Apr 2027 | nodejs24.x: 30 Apr 2028 |
| AWS Lambda blocks function updates | 31 Aug 2027 | 31 Aug 2027 | 1 Jul 2028 |
AWS also lists a Node.js 26 runtime in public preview, with general availability targeted for November 2026. The Lambda table is AWS's forecast for planning, and AWS says the dates can change.
Check and switch Node.js versions
Start by finding out which Node.js version each environment runs. A laptop, a CI runner and a production container often differ.
node -v # version of the node on your PATH
npm -v # npm version bundled with it
which -a node # every node binary on the PATH (where node on Windows)
node -p "process.release.lts" # LTS codename, or undefined on a Current build
To switch the version on your machine, use a version manager. All three read a version file, so the project decides the version rather than whoever last ran an install.
| Tool | Install and switch to Node.js 24 | Pin the version for a project |
|---|---|---|
| nvm | nvm install 24 && nvm use 24, then nvm alias default 24 for new shells | Put 24 in .nvmrc; nvm use with no argument reads it |
| fnm | fnm install 24 && fnm use 24, then fnm default 24 | Reads .node-version or .nvmrc; fnm env --use-on-cd switches on cd |
| Volta | volta install node@24 | volta pin node@24 writes the version into package.json |
Package managers can enforce the version too. Set the range your project supports in the engines field of package.json, for example "engines": { "node": ">=24" }. npm and pnpm print a warning when the running Node.js is outside that range. Add engine-strict=true to .npmrc to make the install fail instead.
A version manager changes your shell and nothing else. Container base images, CI setup steps, serverless runtime settings and system packages each hold their own version, so change those as well. The upgrade steps below cover them.
Where each release line stands on 28 October 2026
| Line | Status | End of life | Latest release | Bundled npm | Bundled OpenSSL |
|---|---|---|---|---|---|
| 18 (Hydrogen) | End of life | 30 Apr 2025 | 18.20.8 | 10.8.2 | 3.0.16 |
| 20 (Iron) | End of life | 30 Apr 2026 | 20.20.2 | 10.8.2 | 3.0.19 |
| 22 (Jod) | Maintenance LTS | 30 Apr 2027 | 22.23.4 | 10.9.9 | 3.5.9 |
| 24 (Krypton) | Maintenance LTS since 20 Oct 2026 | 30 Apr 2028 | 24.22.1 | 11.19.1 | 3.5.9 |
| 26 | Current, LTS from 28 Oct 2026 | 30 Apr 2029 | 26.12.1 | 11.20.0 | 3.5.9 |
Release versions and bundled components come from the nodejs.org distribution index. One schedule change is worth knowing about: starting with Node.js 27, Node.js moves to one major release a year, and every major line becomes LTS after its Current phase. Node.js 26 is the last line under the old odd and even pattern.
Should you target 22 or 24?
- Target 24 if your dependencies support it. You get support until April 2028 and you do the work once.
- Stop at 22 only if something in your stack does not run on 24 yet, for example a native add-on with no Node.js 24 build or a TLS peer that still presents a 1024-bit RSA key. Plan the second hop now, because 22 ends in April 2027.
- Skip 26 for now. It became LTS on 28 October 2026. If you are starting the upgrade in 2027, evaluate it then.
Jumping straight from 18 to 24 is fine. Read the 20 to 22 and 22 to 24 changes below together and fix everything they list.
Breaking changes that affect real applications
| Change | Since | What breaks | What to do |
|---|---|---|---|
| Import assertions removed | 22.0.0 | import data from './data.json' assert { type: 'json' } fails to parse | Use with { type: 'json' }. Codemod: npx codemod run @nodejs/import-assertions-to-attributes. The with form works from 18.20, so the change can ship before you switch runtimes. |
crypto.createCipher() and createDecipher() removed (DEP0106) | 22.0.0 | Calls throw | Move to createCipheriv(). Codemod: @nodejs/crypto-createcipheriv-migration. The migration guide warns the new code cannot decrypt data written by createCipher(), so plan a re-encryption step for stored data. |
require() of ES modules enabled | 22.12.0, 20.19.0 | Packages that relied on require() failing for ESM, or dual packages, can resolve differently | Run your test suite on the target. process.features.require_module tells you if it is on, and --no-experimental-require-module turns it off while you investigate. |
util.is* helpers, util.log, util._extend, the Hash and Hmac constructors and the fs.Stats constructor runtime-deprecated | 22.0.0 | Deprecation warnings at runtime, and failures if you run with --throw-deprecation | Replace with typeof, Array.isArray, Object.assign and crypto.createHash(). |
Default stream highWaterMark raised | 22.0.0 | Memory use per stream changes | Re-measure memory on services that hold many open streams. |
Global WebSocket enabled | 22.0.0 | Polyfills that assume no global can behave differently | Check code that tests for globalThis.WebSocket. |
| OpenSSL 3.5 at security level 2 | 24.x (OpenSSL 3.5 from 24.5.0) | RSA, DSA and DH keys under 2048 bits, ECC keys under 224 bits and RC4 cipher suites are refused | Audit certificates and keys on both sides of every TLS connection. Node.js 22 also bundles OpenSSL 3.5 since 22.20.0, but holds the security level at 1. |
url.parse() runtime-deprecated | 24.0.0 | Warnings at runtime. Node.js 20 already warned on non-numeric ports. | Move to the WHATWG URL API. |
tls.createSecurePair() removed | 24.0.0 | Calls throw | Codemod: @nodejs/tls-create-secure-pair-to-tls-socket. |
dirent.path removed, fs.truncate() with a file descriptor rejected, fs.F_OK style constants deprecated | 24.0.0 | File system helpers fail or warn | Codemods: @nodejs/dirent-path-to-parent-path, @nodejs/fs-truncate-fd-deprecation, @nodejs/fs-access-mode-constants. |
http.OutgoingMessage._headers and ._headersList removed, SlowBuffer runtime-deprecated | 24.0.0 | Old HTTP middleware and buffer code | Use getHeaders() and Buffer.allocUnsafeSlow(). Usually the call is in an old dependency, so upgrade it. |
AsyncLocalStorage uses AsyncContextFrame by default | 24.0.0 | Tracing and APM context can be lost with old agents | Upgrade your APM agent to a release that lists Node.js 24 support. |
| Permission model flag renamed | 24.0.0 | --experimental-permission in start scripts | Use --permission. |
| npm 11 bundled | 24.0.0 | Lockfile and script behaviour can differ from npm 10 | Regenerate the lockfile on the target and review the diff. |
| Platform support | 23.0.0, 24.0.0 | 32-bit Windows dropped in 23, 32-bit armv7 Linux dropped in 24, macOS 13.5 minimum, Linux needs glibc 2.28 or later | Check base images and build agents, especially CentOS 7 era hosts. |
| Native add-ons | Every major | Modules compiled for the old ABI fail to load | Rebuild. The 22 to 24 guide notes add-ons may need updates for V8 13.6 and C++20. |
If you are coming from Node.js 16 or earlier, also read our post on ERR_OSSL_EVP_UNSUPPORTED. Node.js 18 already moved to OpenSSL 3.0, so that error usually shows up one upgrade earlier than this one.
Upgrade steps
- Inventory every place Node.js runs. Container base images, CI runners,
.nvmrcand.node-versionfiles, theenginesfield inpackage.json, serverless runtime settings and any host with a system package. Record the exact version of each. - Surface deprecations on the version you run today. Run the test suite with
--pending-deprecationand--throw-deprecation. Anything that fails is a call site to fix before the switch. - Run the codemods. Apply the ones in the table that match your code, commit them separately and keep them compatible with the old runtime so they can ship before the upgrade.
- Upgrade dependencies that pin Node.js behaviour. APM agents, native add-ons (bcrypt, sharp, database drivers with C bindings), test frameworks and build tools. Check each one's supported Node.js range.
- Audit TLS material for Node.js 24. For each certificate your services present or trust, check the key size, for example
openssl x509 -in cert.pem -noout -text | grep "Public-Key". Anything under 2048-bit RSA fails at security level 2. Include outbound peers such as payment gateways, LDAP and internal APIs. - Switch the runtime in one place. Change the base image or version file, delete
node_modules, reinstall so native modules rebuild, and commit the lockfile npm writes. - Roll out gradually. Canary one instance or a small share of traffic, compare error rates, latency, memory and event loop lag against the old version, then widen.
Test plan
- Full unit and integration suite on the target version, with
--throw-deprecationin CI so new deprecations fail the build. - A TLS smoke test against every external endpoint the service calls, run on the target runtime.
- Startup of every entry point, including workers, cron jobs and CLI scripts that tests do not cover.
- Decryption of a sample of stored data if you replaced
createCipher(). - Load test of the busiest service to catch memory changes from stream buffering and the new V8.
- Trace continuity in your APM tool across async boundaries.
Rollback plan
- Keep the previous image tag or package version deployable until the canary has run through a full business cycle.
- Ship code changes before the runtime change and keep them compatible with both versions. Then rollback is a runtime switch only.
- Keep the old lockfile on a branch. Running the npm 11 lockfile under npm 10 during an incident is a second change you do not want.
- Do not adopt APIs that only exist on the new line until the rollback window has closed.
- If you migrated encrypted data to a new cipher, keep the old ciphertext until you are sure you will not roll back.
If you cannot upgrade in time
Staying on an ended line has a cost you can count. Since Node.js 18 ended, six Node.js security releases have shipped without a 18.x build, which covers 12 CVEs scored 7.0 or higher in OSSeva's CVE directory. Since Node.js 20 ended, two have shipped without a 20.x build, covering 4 CVEs. Counts are as of 20 October 2026, and the list is on Node.js vulnerabilities by version.
Some services cannot move quickly: a native add-on with no new build, a vendor SDK pinned to an old runtime, or a frozen application nobody wants to touch. For those, OSSeva backports Node.js security fixes, including V8 and libuv CVEs, to the 14, 16, 18 and 20 lines and ships them as signed builds, with VEX attestation so scanners and auditors can see which findings are fixed. The Operate tier adds 24/7 runtime monitoring with named Node.js engineers. See Node.js extended support for patched 18 and 20 runtimes, Node.js support for every tier, and the end-of-life pages for Node.js 18, Node.js 20 and Node.js 22. The full timeline is on the Node.js end-of-life tracker.
Common questions
Can I go from Node.js 18 straight to 24?
Yes. There is no requirement to stop at 20 or 22. Fix everything in both migration guides and test on 24 directly.
Is Node.js 22 still safe to run?
Yes, until 30 April 2027. It is in maintenance, so it still gets security fixes but no new features. Treat it as a short stop.
Why does a TLS connection fail on Node.js 24 but not on 22?
Both bundle OpenSSL 3.5, but Node.js 22 keeps OpenSSL at security level 1 and Node.js 24 uses the OpenSSL default of level 2. A peer with a key under 2048 bits, or one that only offers RC4, is refused on 24.
When does Node.js 26 become LTS?
On 28 October 2026, according to the release schedule. It is supported until 30 April 2029.
Sources
All checked on 28 October 2026.
- Node.js release schedule: github.com/nodejs/Release and schedule.json; versions, bundled npm and OpenSSL from the nodejs.org distribution index.
- Release notes: Node.js 22.0.0, Node.js 24.0.0, Node.js 24.5.0 (OpenSSL 3.5.1), Node.js 20.19.0 (require of ES modules) and Node.js 22.20.0 (OpenSSL security level held at 1). The Node.js 24 TLS documentation gives the default security level of 2.
- AWS Lambda runtimes, deprecation policy and shared responsibility model: docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html.
Tags
Related articles
What It Costs to Patch Unsupported Node.js: Upgrade vs Extended Support
November 17, 2026OperationsUpgrade Node.js or Buy Third-Party Patches? A Decision Framework
November 17, 2026MigrationAzure Functions .NET 8 End of Support: The Isolated Worker Warning Explained
October 8, 2026MigrationAzure App Service .NET 8 End of Support: What Happens to Your Web App
October 8, 2026MigrationAWS Lambda .NET 8 Runtime Deprecation: Dates and Upgrade Path
October 8, 2026MigrationUpgrade ZooKeeper 3.4 or 3.5 to 3.8 or 3.9 In Place: A Rolling Upgrade Guide
October 5, 2026Get a quote
Ready to get your open source under control?
Tell us what you run. An OSSeva engineer replies within 1 business day with CVE coverage and a price for your stack.
Prefer to talk or read more first?