CVE-2026-126187 is a critical remote code execution bug in React Server Components (CVSS 9.5). It hits Next.js 16.0.0–16.4.0 apps using Cache Components and RSC packages before 19.0.9, 19.1.10, 19.2.9 or 19.3.1. Fix: Next.js 16.4.5 or 15.5.29. Status: official, per the React and Next.js advisories, checked November 26, 2026.
What CVE-2026-126187 is, in plain words
React Server Components send data between the server and the browser in a special serialized format. Most values in that format are plain JSON, but binary data such as Uint8Array or Float32Array (typed arrays) gets its own encoding. The bug sits in how the server-side runtime handles a response that carries several typed arrays together with a value the attacker controls. A crafted payload in that situation lets the attacker run code on the server, without logging in and without any action from a user.
The React advisory GHSA-xqc2-xf4c-x3h3 rates it Critical: 9.5 under CVSS v4.0. The score is not a perfect 10 for one reason: the vector says AT:P, meaning the attack only works when the app has a specific setup. GitLab's advisory database scores the same issue 10.0 under the older CVSS 3.1, which is why both numbers circulate. The weakness class is CWE-502, deserialization of untrusted data, the same family as the React2Shell bug of December 2025.
The timeline matters, because it explains why you may have missed this:
- October 14, 2026 — React and Next.js publish the fixes and their advisories. Next.js ships 16.4.1.
- November 10, 2026 — the CVE number is assigned and the advisory lands in the GitHub Advisory Database. From that day
npm auditand Dependabot start flagging it. - After that — according to Cloudflare Radar, public repositories claiming a proof of concept appeared for the Next.js variant on October 17 and for the React variant on November 8–9. We could not open the Radar page ourselves, and those repositories are unverified.
So a project whose maintainers rely on automated alerts got no warning for almost four weeks after the fix existed. If you are reading this in late November and have not touched your next version since early October, assume you are behind.
Who is affected: versions and fixes
| Package | Vulnerable | First fix | Install now |
|---|---|---|---|
next 16.x | 16.0.0–16.4.0 | 16.4.1 | 16.4.5 |
next 15.x | Not listed by Next.js; Mend lists 15.0.0–15.5.27 | 15.5.28 (per Mend) | 15.5.29 |
react-server-dom-webpack | 19.0.0–19.0.8, 19.1.0–19.1.9, 19.2.0–19.2.8, 19.3.0 | 19.0.9, 19.1.10, 19.2.9, 19.3.1 | The fixed release of your minor line |
react-server-dom-turbopack | |||
react-server-dom-parcel |
The Next.js advisory GHSA-673q-mjm6-r5xr is narrower than the React one. It describes remote code execution in an App Router app that has Cache Components turned on and a use cache function that returns several typed arrays. It also says there is no workaround and asks everyone on 16.x to upgrade right away, even without such functions.
The “install now” column is ahead of the first fix on purpose. Since October 14, Next.js has shipped its November security release (16.4.5 and 15.5.29), so jumping straight to the latest patch closes this bug and the newer ones in one deploy.
Who is not affected
- React in the browser only. A single-page app built with Vite or Create React App renders on the client. It has no server-side RSC runtime and no
react-server-dom-*packages, so there is nothing to attack. - Static export. A Next.js site built with
output: 'export'is a folder of HTML and JS. No React runs on the server at request time. - Pages Router only. Without the App Router, the condition from the Next.js advisory is not met. Update anyway: the same release fixed a critical Image Optimization bug that has nothing to do with the router.
- App Router without Cache Components. If
cacheComponentsis not enabled, the RCE path described by Next.js does not exist in your app. Next.js still tells you to upgrade, and it is a patch release, so there is little reason to wait.
Other frameworks that render React Server Components (anything that installs a react-server-dom-* package) follow the React advisory, not the Next.js one. The lockfile tells you whether that is your case.
How to check your project in two minutes
Run the first block in the project repository and the last two lines on the server that actually serves traffic. A laptop and a production server often disagree, especially when the deploy pipeline has failed quietly.
npm ls next react react-dom
npm ls react-server-dom-webpack react-server-dom-turbopack react-server-dom-parcel
# does the app use the feature the Next.js advisory is about?
grep -rn --include=*.ts --include=*.tsx "use cache" app src
grep -n "cacheComponents" next.config.*
# on the server, inside the app directory
node -p "require('next/package.json').version"
cat .next/BUILD_IDHow to read the result:
npm ls nextshows 16.0.0–16.4.0 — you are on a vulnerable release; update today. 16.4.1–16.4.4 is safe from this bug but misses the November fixes.npm ls react-server-dom-webpackprints nothing in a Next.js project — that is normal. Next.js bundles its own copy of these packages insidenext/dist/compiled, which is exactly why the version ofnextis what counts.- The two
grepcommands finduse cachefunctions and thecacheComponentsflag. Both present on a vulnerable version means you match the exact scenario from the advisory.
How to update Next.js and confirm the deploy
Next.js 16
npm install next@16.4.5 eslint-config-next@16.4.5
npm ls next # the lockfile must show 16.4.5
npm run buildWithin the 16.4 line this is a patch update, so APIs do not change. Bump eslint-config-next and any @next/* packages to the same version so the toolchain stays in sync.
Next.js 15
npm install next@15.5.29 eslint-config-next@15.5.29
npm ls next # the lockfile must show 15.5.29
npm run buildMoving from an early 15.x release (say, 15.1) to 15.5.29 crosses several minor versions. Read the upgrade notes for the minors you skip and run your tests, but do not let that delay the update for weeks: 15.x stays in Maintenance LTS only until January 31, 2027.
Other frameworks with React Server Components
Here you update the RSC package yourself. It must stay on the same minor line as react and react-dom, otherwise the server and client parts disagree about the wire format:
npm ls react # e.g. react@19.2.x
npm install react-server-dom-webpack@19.2.9 # same minor line as react
# use -turbopack or -parcel instead if that is what your framework installsMake sure the fix is really live
Commit the updated lockfile and check that CI installs with npm ci, not npm install: otherwise the build may resolve a different version. On a self-hosted server, restart the process; a running Node process keeps the old code in memory until then.
# self-hosted server under PM2
git pull
npm ci # install exactly what the lockfile says
npm run build
pm2 reload my-app
# proof that the new build is live
node -p "require('next/package.json').version"
cat .next/BUILD_ID # must differ from the value before the deployWhat else 16.4.1 and the November release fixed
The 16.4.1 release of October 14 closed three advisories at once. Besides this one, it fixed GHSA-2464-fhr4-w9xw, a critical remote code execution through the Image Optimization API with SVG files, and GHSA-p3m5-59mp-jv5r, a high-severity denial of service in App Router apps that use Server Actions. Those two were also patched in 15.5.28, which is why even a Pages Router project on 15.x should not skip this update.
On November 3, Next.js followed with its scheduled security release, 16.4.5 and 15.5.29, which covers seven more issues around use cache, cookies in Edge routes, image optimization and proxied responses. We went through that release, together with the November Node.js update, in the guide on updating Node.js and Next.js. If you update Next.js today, it is a good moment to check the Node.js version on the same server too.
React2STEAL: old bugs are being exploited again
While the new CVE was quietly waiting for its number, an automated campaign started hitting old ones. Chainguard describes React2STEAL (post of November 18, 2026) as a scanner that runs on GitHub Actions in hijacked accounts. The first repositories appeared on October 22, with larger waves on November 11 and 14. Chainguard stresses it is not a supply chain attack: nothing malicious is published to npm, the campaign attacks live websites.
It goes after three things:
- CVE-2025-55182 (React2Shell) — the CVSS 10.0 React Server Components bug disclosed on December 3, 2025.
- CVE-2025-29927 — the Next.js middleware bypass from March 2025, fixed in 15.2.3 and 14.2.25.
- SSRF through
/_next/image— asking the image optimizer to fetch the cloud metadata address 169.254.169.254.
After a successful break-in, the script collects environment variables, .env and config files, cloud credentials and AI provider keys, and commits them to public repositories. Apps that were never updated since 2025 are the main victims, but the campaign is a good reason to check any Next.js server you are responsible for.
A second campaign, React2Keys, collected more than 50,000 credentials through the same React2Shell bug, according to CloudSEK's report of November 30, 2026. We explain how to check your server and in which order to rotate keys.
How to check your logs
Chainguard lists these indicators: the x-middleware-subrequest header repeated five times, /_next/image?url= pointing at 169.254.169.254, a Next-Action: x header with the multipart boundary bissa_cve_boundary (one variant randomizes it), and outbound calls from the web server to AI provider APIs. The image requests are visible in a standard access log:
# SSRF attempts against cloud metadata through the image optimizer
grep -E "_next/image\?url=[^ ]*169\.254\.169\.254" /var/log/nginx/access.log*
zgrep -E "_next/image\?url=[^ ]*169\.254\.169\.254" /var/log/nginx/access.log.*.gz
# a spike of POST requests to pages without forms deserves a closer look
grep -c "\"POST / " /var/log/nginx/access.logHeaders are not in nginx's default log format. To see the other indicators from now on, add a format that records them:
# inside http { ... }: log the headers that reveal React2STEAL probes
log_format rsc '$remote_addr [$time_local] "$request" $status '
'action="$http_next_action" mw="$http_x_middleware_subrequest"';
access_log /var/log/nginx/rsc.log rsc;Hosting and WAF: what they do and do not cover
Large hosts and CDNs usually add WAF rules for high-profile framework bugs, and that helps against the laziest scanners. Two limits are worth keeping in mind:
- A rule matches known payloads. Exploit code varies; a rule written for one public PoC can miss the next. Treat the WAF as extra time, not as a patch.
- Your dependency is yours. A managed platform runs whatever version of
nextis in your lockfile. It will not rebuild your app with 16.4.5 on its own; you have to redeploy.
We did not verify what each provider has deployed for this specific CVE, so check your host's changelog rather than assuming. On a VPS or a dedicated server with next start behind nginx, there is no one in between: everything above is on you.
How not to miss the next advisory
The lesson of this bug is the four-week gap between the fix and the CVE. Tools that only read the CVE database learned about it late; people who watched the repositories knew on October 14.
- Watch the repositories. On GitHub, set “Watch → Custom → Security alerts” for
vercel/next.jsandfacebook/react. Advisories arrive the day they are published. - Dependabot or Renovate. They open a pull request as soon as a patched version exists. Grouping keeps Next.js and its companion packages on one version.
npm auditin CI. It is late for zero-days, but it catches the old, well-known ones that campaigns like React2STEAL rely on.
# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
groups:
nextjs:
patterns: ["next", "eslint-config-next", "@next/*"]
react:
patterns: ["react", "react-dom", "react-server-dom-*"]Bugs in the framework are one risk; malicious packages in the dependency tree are another, with different defenses. We cover those in the guide on npm supply chain attacks.
Frequently asked questions
Is updating React enough to fix CVE-2026-126187 in a Next.js app?
No. Next.js ships its own compiled copy of the React Server Components packages inside next/dist/compiled, so the version of next decides whether you are patched. Update next to 16.4.5 or 15.5.29; updating react and react-dom alone changes nothing for this bug.
Is the Pages Router affected?
The Next.js advisory describes the remote code execution only for App Router apps that use Cache Components and a use cache function returning several typed arrays. A Pages Router app does not meet that condition. The same release still fixed other critical issues, so update anyway.
Does my hosting provider's WAF protect me?
It may block known exploit payloads, but it is an extra layer, not a fix. Rules match known patterns, and attackers vary payloads. Neither Vercel nor any other host updates the next version in your package.json for you: a redeploy with the patched version is the only real fix.
What are Cache Components?
Cache Components is the Next.js 16 caching model you enable with cacheComponents in next.config. It lets you mark functions and components with the use cache directive so their results are cached and reused. The vulnerable path is a use cache function whose result contains several typed arrays, such as Uint8Array.
How do I know whether my app has already been attacked?
Look for the React2STEAL indicators: /_next/image requests pointing at 169.254.169.254, repeated x-middleware-subrequest headers, Next-Action: x headers, and unexpected outbound calls from the server to AI provider APIs. If you find any, rotate every secret the server could read, starting with .env and cloud keys.
I am still on Next.js 14. What should I do?
Next.js 14 and older receive no security releases. The Next.js advisory for this bug only lists 16.x, but older lines carry other unpatched issues, including the ones React2STEAL exploits. Plan a move to 15.5.29 as a stopgap or straight to 16.4.5; 15.x is supported until January 31, 2027.
