
During one week in October 2026, urgent security fixes were released for Node.js and Next.js. Both were found to contain vulnerabilities that could allow an attacker to execute their own code on your server.
If your website, online store, or bot runs on Node.js or Next.js, update them. It should take about 15–30 minutes. Below is a simple step-by-step guide. ZOMRO / contact form Need help from a system administrator? Describe the issue and we will get back to you within 15 minutes.
What Are Node.js and Next.js?
Imagine a car.
Node.js is the engine. It makes an application run on a server. Thousands of websites, bots, APIs, and online stores rely on it.
Next.js is the body and interior. It provides a ready-made foundation for a website: pages, images, and forms. Next.js always runs on top of Node.js.
In October, problems were found in both the engine and the body. That means you need to fix both. Updating only Next.js leaves the engine defective, and vice versa.
Node.js: Dangerous Decompression
On October 21, Node.js released fixes for 10 vulnerabilities at once. The most dangerous one was assigned CVE-2026-111497.
What is the bug? To transfer data faster over a network, it is compressed. One popular compression method is called Brotli. Node.js can decompress such data, but a bug was found in its decompressor.
Imagine a vacuum-sealed bag of clothes. You cut it open, and the clothes take up their space on a shelf. Now imagine a specially packed bag. When you open it, the contents spill beyond the shelf and knock into the things next to it. The same thing happens here: specially crafted data is written where it should not be during decompression. This could allow an attacker to execute their own code.
Who is at risk? Applications that decompress compressed data received from others. For example, servers that receive responses from third-party APIs through fetch() or use Express 5.
Three more serious bugs. They concern certificate and address validation. Imagine a security guard checking passes. If someone writes a number on a pass in a special font, the guard might let the wrong person through. Similarly, Node.js could, in some cases, mistake a fake server for a genuine one.
There is no workaround. Updating is the only protection.
Next.js: An Image with a Surprise
On October 14, Next.js released an urgent update. It fixes two critical vulnerabilities rated 9.5 out of 10 and one high-severity vulnerability.
First: dangerous SVG images (CVE-2026-96889). Next.js can resize and compress website images automatically. It uses the sharp library for this. A bug was discovered in how sharp processes SVG images.
It is like a Trojan horse. On the outside, it looks like a normal image, but hidden inside is code that runs when the server processes it. This is dangerous if your website allows users to upload images. Affected Next.js versions are 10 through 15.5.27 and 16.0 through 16.4.0.
Second: a caching bug (GHSA-673q-mjm6-r5xr). This affects only newer websites running Next.js 16 with the Cache Components feature enabled. An attacker can execute code without a password. There is no temporary workaround; you must update.
Third: denial of service. Specially crafted requests to website forms (Server Actions) can overload the server and make the site unavailable.
Important. The familiar
npm auditcheck does not detect all these vulnerabilities. Do not rely on it alone. Check versions manually as described below.
Who Is Affected?
Node.js. Anyone running Node.js-based software on a server:
- websites built with Next.js, Nuxt, Remix, or Astro;
- APIs built with Express, NestJS, or Fastify;
- Telegram and Discord bots;
- admin dashboards, control panels, and online stores built with JavaScript;
- applications in Docker containers using
node:images.
Next.js. Anyone hosting a Next.js website, versions 10 through 16.4.0, on their own server or VPS.
Node.js 20, 23, 25, and earlier versions will not receive fixes. Their support has ended. It is like using a phone that no longer gets security updates: it still works, but becomes riskier every month.
Check Your Versions
Connect to your server over SSH.
Node.js version:
node -v
Next.js and sharp versions. Go to your website's directory and run:
npm ls next sharp
Compare the results with this table:
| Software | Safe version |
|---|---|
Node.js 22 | 22.23.4 or later |
Node.js 24 | 24.22.1 or later |
Node.js 26 | 26.12.1 or later |
Node.js 20, 23, 25, and older | No fix available; migrate to 22, 24, or 26 |
Next.js 16 | 16.4.1 or later (latest at the time: 16.4.3) |
Next.js 15 | 15.5.28 or later |
Next.js 14 and older | No fix available; migrate to 15 or 16 |
sharp | 0.35.5 or later |
Your server may have multiple Node.js installations. For example, you may have installed it using nvm, or it may be running inside Docker. The node -v command shows only one installation. Also check the processes that are actually running:
ps aux | grep nodeUpdate Node.js
The procedure depends on how Node.js was installed.
If you installed it through nvm (the most common option among developers):
nvm install 24
nvm alias default 24Replace 24 with your chosen release line: 22, 24, or 26. nvm will automatically install the latest version in that line.
Если через пакетный менеджер Ubuntu или Debian:
sudo apt update
sudo apt install --only-upgrade nodejs
If you use Docker. Change the version in the first line of your Dockerfile. For example:
FROM node:24.22.1-bookworm-slimAfter the update, run node -v again and make sure the version matches the table.
If you use Node.js 20 or older. Moving to 22 or 24 is more than a routine update; it is a migration. Think of moving from Windows 7 to Windows 11: most programs will work, but some may break. Test your site on a staging server first.
Update Next.js and sharp
Before updating, back up the project or make a Git commit. If anything goes wrong, you can roll back quickly.
Next.js 16:
npm install next@latest eslint-config-next@latest
Next.js 15:
npm install next@15.5.28
npm install sharp@^0.35.5
The second command matters. After updating Next.js 15, an older sharp 0.34 often remains installed. In that case, the image-processing vulnerability remains open.
Check the result:
npm ls next sharp
Then rebuild the website:
npm run build
Bonus. If you have not updated for a while, this update will also address vulnerabilities fixed in September. Back then, Next.js released another fix for a dangerous image-generation bug and seven fixes related to caching and data protection.
Restart and Rebuild
After an update, the new version is on disk, but the old one keeps running in memory until you restart the application. It is like buying new tires and keeping them in your trunk: the car is still driving on the old ones.
If the site runs under PM2:
pm2 restart all
If it runs under systemd (replace mysite with your service name):
sudo systemctl restart mysite
If it runs in Docker:
docker compose build --pull
docker compose up -d
The --pull flag tells Docker to download the latest base image. Without it, Docker may reuse an older cached image.
After restarting, open your website and test its main pages, forms, and image uploads.
Checklist
- Checked the Node.js version with
node -v - Checked whether other Node.js versions are running
- Updated Node.js to 22.23.4, 24.22.1, or 26.12.1
- Backed up the project before updating
- Updated Next.js to 16.4.1+ or 15.5.28+
- Verified that sharp is at least version 0.35.5
- Rebuilt the website using
npm run build - Restarted the application or containers
- Confirmed that the website, forms, and images work
Don't Want to Handle It Yourself?
On paper, everything looks straightforward. In practice, a Next.js build might fail with an obscure error after an update. Or you might discover three different Node.js versions on the server and have no idea which one is actually serving the site. Or migrating from Node.js 20 might require upgrading half of your dependencies.
Zomro offers two options for situations like these.
SOD: We'll Update Everything for You
Our system administrator will:
- find all Node.js installations on the server and inside containers;
- update Node.js, Next.js, and sharp to safe versions;
- rebuild and restart the application;
- check that the website works after the update.
Cost: €12.50 per 15 minutes of work.
Premium: Fast Help When You Need It
If your website goes down after an update, every hour of downtime costs money. A standard technical support request can take up to 10 hours to receive a response. With Premium, we respond within 5–30 minutes.
Node.js and Next.js release security fixes almost every month. With Premium, you will not have to deal with them alone.


