CVE-2026-44580
next.js: Next.js: Cross-site scripting allows arbitrary code execution via untrusted script content
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · May 14, 2026
Updated · July 7, 2026
Description
A flaw was found in Next.js. A remote attacker could exploit this cross-site scripting (XSS) vulnerability by injecting untrusted content into beforeInteractive scripts. Due to improper escaping of serialized script content, this could allow the attacker to execute arbitrary JavaScript code in a visitor's browser, leading to information disclosure or unauthorized actions.
Statement
This is a Moderate cross-site scripting (XSS) vulnerability affecting Next.js applications. The flaw occurs when applications employ beforeInteractive scripts with unsanitized, untrusted content, enabling remote attackers to execute arbitrary JavaScript. The requirement for this specific script strategy and attacker-controlled input limits the overall exposure in Red Hat deployments.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 6.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')