nextjs - 💡(How to fix) Fix Version confusion in Next.js 16.0.7+ bundled React packages causes CVE-2025-55182 false alarm [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#87028Fetched 2026-04-08 02:08:00
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
closed ×1commented ×1labeled ×1locked ×1

After upgrading to Next.js 16.0.8 to address CVE-2025-55182 (React2Shell), users may incorrectly believe they are still vulnerable due to version string inconsistencies in the bundled React packages.

The security fix for CVE-2025-55182 is present in Next.js 16.0.7+, but the version strings reported by React DevTools and various bundled files create significant confusion about whether the fix is actually in place.

Root Cause

After upgrading to Next.js 16.0.8 to address CVE-2025-55182 (React2Shell), users may incorrectly believe they are still vulnerable due to version string inconsistencies in the bundled React packages.

The security fix for CVE-2025-55182 is present in Next.js 16.0.7+, but the version strings reported by React DevTools and various bundled files create significant confusion about whether the fix is actually in place.

Code Example

__REACT_DEVTOOLS_GLOBAL_HOOK__.renderers.values().next()["value"]["version"]
// Returns: '19.3.0-canary-52684925-20251110'

---

grep -r "exports.version" node_modules/next/dist/compiled/react-dom/cjs/*.js
# All files show: 19.3.0-canary-52684925-20251110

---

# RSC packages (fixed version):
   cat node_modules/next/dist/compiled/react-server-dom-turbopack/package.json | grep -A2 peerDependencies

   # react-dom (old version string):
   grep "exports.version" node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js

---

// react-server-dom-turbopack-server.node.production.js
return "*" === metadata[2]
    ? moduleExports
    : "" === metadata[2]
      ? moduleExports.__esModule
        ? moduleExports.default
        : moduleExports
      : moduleExports[metadata[2]]; // Direct property access - VULNERABLE

---

// react-server-dom-turbopack-server.node.production.js
if ("*" === metadata[2]) return moduleExports;
if ("" === metadata[2])
  return moduleExports.__esModule ? moduleExports.default : moduleExports;
if (hasOwnProperty.call(moduleExports, metadata[2])) // Safe check - FIXED
  return moduleExports[metadata[2]];
RAW_BUFFERClick to expand / collapse

Description

After upgrading to Next.js 16.0.8 to address CVE-2025-55182 (React2Shell), users may incorrectly believe they are still vulnerable due to version string inconsistencies in the bundled React packages.

The security fix for CVE-2025-55182 is present in Next.js 16.0.7+, but the version strings reported by React DevTools and various bundled files create significant confusion about whether the fix is actually in place.

Version Discrepancy Details

In Next.js 16.0.8:

PackageVersion in package.json peerDepsVersion in exports.version
react-server-dom-turbopack19.3.0-canary-709fe18f-20251202N/A
react-server-dom-webpack19.3.0-canary-709fe18f-20251202N/A
reactN/A19.3.0-canary-52684925-20251110 ⚠️
react-domN/A19.3.0-canary-52684925-20251110 ⚠️

The CVE fix (hasOwnProperty.call(moduleExports, metadata[2])) IS present in the react-server-dom-* server files, but the bundled react and react-dom packages were not updated to the same canary version.

Impact

When users run this command in React DevTools to verify their React version:

__REACT_DEVTOOLS_GLOBAL_HOOK__.renderers.values().next()["value"]["version"]
// Returns: '19.3.0-canary-52684925-20251110'

This returns the older canary version (52684925-20251110), causing users to believe they may be running a vulnerable version.

Similarly, searching for version strings in node_modules/next:

grep -r "exports.version" node_modules/next/dist/compiled/react-dom/cjs/*.js
# All files show: 19.3.0-canary-52684925-20251110

Reproduction Steps

  1. Create a new Next.js 16.0.8 project

  2. Run npm install or pnpm install

  3. Check version strings:

    # RSC packages (fixed version):
    cat node_modules/next/dist/compiled/react-server-dom-turbopack/package.json | grep -A2 peerDependencies
    
    # react-dom (old version string):
    grep "exports.version" node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js
  4. Start the dev server and check React DevTools - it reports the older version

Evidence the Fix IS Present

Comparing Next.js 16.0.6 (vulnerable) vs 16.0.7+ (fixed):

16.0.6 (vulnerable):

// react-server-dom-turbopack-server.node.production.js
return "*" === metadata[2]
    ? moduleExports
    : "" === metadata[2]
      ? moduleExports.__esModule
        ? moduleExports.default
        : moduleExports
      : moduleExports[metadata[2]]; // Direct property access - VULNERABLE

16.0.7+ (fixed):

// react-server-dom-turbopack-server.node.production.js
if ("*" === metadata[2]) return moduleExports;
if ("" === metadata[2])
  return moduleExports.__esModule ? moduleExports.default : moduleExports;
if (hasOwnProperty.call(moduleExports, metadata[2])) // Safe check - FIXED
  return moduleExports[metadata[2]];

Suggested Resolution

  1. Update the bundled react and react-dom packages to match the same canary version (709fe18f-20251202) as the RSC packages for consistency
  2. Or add documentation explaining why version strings may differ and how users can verify the fix is present
  3. Consider adding a security verification utility or changelog note that explicitly states the CVE fix status

Environment

  • Next.js: 16.0.8
  • OS: macOS
  • Package manager: pnpm

Related

extent analysis

TL;DR

Update the bundled react and react-dom packages to match the same canary version as the RSC packages for consistency, or add documentation to explain the version discrepancy and how to verify the CVE fix.

Guidance

  • Verify the presence of the CVE fix by checking the react-server-dom-* server files for the hasOwnProperty.call(moduleExports, metadata[2]) safe check.
  • Update the bundled react and react-dom packages to the same canary version (709fe18f-20251202) as the RSC packages.
  • Consider adding documentation or a security verification utility to clarify the version discrepancy and provide a clear way to verify the CVE fix status.
  • Check the React DevTools version string and compare it with the version strings in the node_modules/next directory to identify any inconsistencies.

Example

No code snippet is provided as the issue is related to version inconsistencies and not a specific code problem.

Notes

The suggested resolution focuses on updating the bundled packages or adding documentation to address the version discrepancy. This approach may not be applicable if the version inconsistency is not the root cause of the issue.

Recommendation

Apply a workaround by adding documentation to explain the version discrepancy and provide a clear way to verify the CVE fix status, as updating the bundled packages may not be feasible or immediate. This approach allows users to understand the situation and verify the fix while waiting for a potential update to the bundled packages.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING