CVE-2026-44581

Next.js: Cross-site scripting in App Router applications using CSP nonces

Published May 13, 2026 CVSS 3.1 · 4.7 Medium EPSS < 1% KEV · Not listed
Description
Next.js is a React framework for building full-stack web applications. From 13.4.0 to before 15.5.16 and 16.2.5, App Router applications that rely on CSP nonces can be vulnerable to stored cross-site scripting when deployed behind shared caches. In affected versions, malformed nonce values derived from request headers could be reflected into rendered HTML in an unsafe way, allowing an attacker to poison cached responses and cause script execution for later visitors. This vulnerability is fixed in 15.5.16 and 16.2.5.

Analysis

AI-generated

Technical impact

Next.js versions from 13.4.0 up to just before 15.5.16 and 16.2.5 allow malformed CSP nonces derived from request headers to be rendered unsafely in application pages. An attacker can exploit the reflected nonce to store malicious script payloads in shared cache entries, leading to script execution for subsequent users viewing the cached content.

Affected Systems

Vercel's Next.js framework, specifically App Router applications running version 13.4.0 through 15.5.15 and version 16.2.4. Users of these releases should check that their project dependencies reference one of the fixed versions.

Risk and Exploitability

The CVSS score of 4.7 indicates a low risk rating, and EPSS data is not available, so native exploitation likelihood cannot be quantified. The vulnerability is not in the CISA KEV catalog. It requires deployment behind a shared cache and reliable reflection of nonce values; the attacker can poison cache entries and cause arbitrary script execution for later visitors. Because the flaw is a stored cross‑site scripting issue, once the malicious nonce is cached it impacts all users who receive the cached response.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Next.js to version 15.5.16 or later, or 16.2.5 or later, where the nonce handling bug has been fixed.
  • Ensure that your deployment environment does not cache pages that include user‑specific CSP nonces, or configure cache to be user‑aware or bypassed for those pages.
  • Validate that the application properly sanitizes any data derived from request headers before using it as a CSP nonce to prevent future reflection vulnerabilities.

Generated by OpenCVE AI on May 13, 2026 at 19:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-ffhc-5mcf-pf4q Next.js vulnerable to cross-site scripting in App Router applications using CSP nonces
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:2.3:a:vercel:next.js:*:*:*:*:*:node.js:*:*
Type Values Removed Values Added
First Time appeared Vercel
Vercel next.js
Vendors & Products Vercel
Vercel next.js
Type Values Removed Values Added
Description Next.js is a React framework for building full-stack web applications. From 13.4.0 to before 15.5.16 and 16.2.5, App Router applications that rely on CSP nonces can be vulnerable to stored cross-site scripting when deployed behind shared caches. In affected versions, malformed nonce values derived from request headers could be reflected into rendered HTML in an unsafe way, allowing an attacker to poison cached responses and cause script execution for later visitors. This vulnerability is fixed in 15.5.16 and 16.2.5.
Title Next.js: Cross-site scripting in App Router applications using CSP nonces
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 18, 2026, 2:13 PM
Reserved
May 6, 2026, 9:49 PM
Status
Analyzed
Published
May 13, 2026, 6:16 PM
Modified
Oct 26, 2026, 2:10 PM
Severity
Moderate
Public date
May 13, 2026, 5:07 PM