nextjs - 💡(How to fix) Fix [Urgent] Critical Security Issue for pkg:javascript/[email protected] in complied bundles

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…

Fix Action

Fix / Workaround

Risk: CRITICAL Affacted Paths: zhk-hnw-web\axa-next\node_modules\next\dist\compiled\jsonwebtoken\index.js zhk-hnw-web\axa-next\node_modules\next\dist\compiled\babel-packages\packages-bundle.js CVE: CVE-2026-4800 CWE: CWE-94 Improper Control of Generation of Code ('Code Injection') Issues Details Impact: The fix for CVE-2021-23337 (https://github.com/advisories/GHSA-35jh-r3h4-6jhm) added validation for the variable option in _.template but did not apply the same validation to options.imports key names. Both paths flow into the same Function() constructor sink. When an application passes untrusted input as options.imports key names, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time. Additionally, _.template uses assignInWith to merge imports, which enumerates inherited properties via for..in. If Object.prototype has been polluted by any other vector, the polluted keys are copied into the imports object and passed to Function(). Patches: Users should upgrade to version 4.18.0. Workarounds: Do not pass untrusted input as key names in options.imports. Only use developer-controlled, static key names.

Code Example

**Nextjs Version:** 16.2.7
**Tools:** OWAP Dependency-check
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/vercel/next.js/issues

To Reproduce

Risk: CRITICAL Affacted Paths: zhk-hnw-web\axa-next\node_modules\next\dist\compiled\jsonwebtoken\index.js zhk-hnw-web\axa-next\node_modules\next\dist\compiled\babel-packages\packages-bundle.js CVE: CVE-2026-4800 CWE: CWE-94 Improper Control of Generation of Code ('Code Injection') Issues Details Impact: The fix for CVE-2021-23337 (https://github.com/advisories/GHSA-35jh-r3h4-6jhm) added validation for the variable option in _.template but did not apply the same validation to options.imports key names. Both paths flow into the same Function() constructor sink. When an application passes untrusted input as options.imports key names, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time. Additionally, _.template uses assignInWith to merge imports, which enumerates inherited properties via for..in. If Object.prototype has been polluted by any other vector, the polluted keys are copied into the imports object and passed to Function(). Patches: Users should upgrade to version 4.18.0. Workarounds: Do not pass untrusted input as key names in options.imports. Only use developer-controlled, static key names.

We are preparing to launch our official information website. However, the security team has flagged a critical vulnerability that must be resolved before deployment. Although we have noted that this issue cannot be directly triggered or exploited through any website touchpoints, the launch is currently on hold until it is addressed

Current vs. Expected behavior

Fixed Version: Lodash: ^4.18.0

Provide environment information

**Nextjs Version:** 16.2.7
**Tools:** OWAP Dependency-check

Which area(s) are affected? (Select all that apply)

Testing

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

No response

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