The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-44580

CVE-2026-44580: Next.js beforeInteractive XSS Vulnerability

CVE-2026-44580 is a cross-site scripting flaw in Next.js affecting beforeInteractive scripts with untrusted content. Attackers can execute arbitrary JavaScript in browsers. This article covers technical details, affected versions, and mitigation steps.

Published: May 14, 2026

CVE-2026-44580 Overview

CVE-2026-44580 is a cross-site scripting (XSS) vulnerability in Next.js, the React framework for full-stack web applications maintained by Vercel. The flaw affects versions from 13.0.0 up to but not including 15.5.16 and 16.2.5. Applications that combine beforeInteractive scripts with untrusted content fail to safely escape serialized script content before embedding it into the document. Attacker-controlled input can break out of the intended script context and execute arbitrary JavaScript in a visitor's browser. The issue is tracked under [CWE-79] (Improper Neutralization of Input During Web Page Generation) and is fixed in Next.js 15.5.16 and 16.2.5.

Critical Impact

Attackers can inject arbitrary JavaScript that executes in the context of a visitor's browser session, enabling session theft, credential harvesting, and unauthorized actions on behalf of the user.

Affected Products

  • Next.js versions 13.0.0 through 15.5.15
  • Next.js 16.x versions prior to 16.2.5
  • Applications using beforeInteractive script strategy with untrusted input

Discovery Timeline

  • 2026-05-13 - CVE-2026-44580 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-44580

Vulnerability Analysis

The vulnerability resides in the rendering path that handles Next.js beforeInteractive scripts. The beforeInteractive strategy is used to load scripts that must run before the page becomes interactive, such as polyfills or bot detection libraries. Next.js serializes the script's content and embeds it directly into the server-rendered HTML document.

In affected versions, the framework did not properly escape this serialized content before placing it inside a <script> element. When developers pass untrusted input as script content or arguments, attacker-supplied data can terminate the script context using sequences such as </script> or other HTML-significant characters. Once the context is broken, the attacker can introduce additional HTML and JavaScript that the browser executes.

Root Cause

The root cause is improper output encoding when serializing inline script content for the beforeInteractive strategy. The framework treated the embedded content as safe by default, omitting the encoding required to neutralize sequences that close or escape the surrounding <script> tag. This pattern is a textbook instance of [CWE-79], where input is reflected into a sensitive context without context-appropriate sanitization.

Attack Vector

Exploitation requires user interaction, typically a visit to a page where the application embeds attacker-controlled data into a beforeInteractive script. The attacker delivers a crafted URL or payload, often through a phishing message, that causes the vulnerable page to serialize hostile input into the document. When the victim loads the page, the injected script executes with full access to the page's origin, including cookies accessible to JavaScript and the DOM.

No verified public proof-of-concept code is available. The vulnerability mechanism is documented in the GitHub Security Advisory GHSA-gx5p-jg67-6x7h.

Detection Methods for CVE-2026-44580

Indicators of Compromise

  • Unexpected </script> sequences or HTML control characters in request parameters, route segments, or headers consumed by beforeInteractive scripts.
  • Outbound requests from end-user browsers to unfamiliar domains immediately after rendering a Next.js page that contains inline scripts.
  • Server logs showing requests with payloads containing encoded JavaScript such as javascript:, onerror=, or base64-encoded script fragments.

Detection Strategies

  • Audit application source for <Script strategy="beforeInteractive"> usage and verify that no dangerouslySetInnerHTML or dynamic content derived from user input is passed to it.
  • Deploy a Content Security Policy (CSP) in report-only mode and review violation reports for inline script execution that should not occur.
  • Run static analysis against the codebase to flag flows where request parameters reach next/script component props.

Monitoring Recommendations

  • Monitor web application firewall (WAF) logs for request parameters containing tag-breaking sequences targeting routes that render inline scripts.
  • Track Next.js dependency versions across all production deployments and alert when versions fall below 15.5.16 or 16.2.5.
  • Review browser error telemetry and CSP violation reports for spikes that correlate with new content or untrusted inputs.

How to Mitigate CVE-2026-44580

Immediate Actions Required

  • Upgrade Next.js to version 15.5.16 or 16.2.5 across all environments that use the framework.
  • Inventory all uses of the beforeInteractive script strategy and confirm none receive untrusted input.
  • Rotate any session tokens or credentials that may have been exposed if exploitation is suspected on internet-facing applications.

Patch Information

Vercel released fixes in Next.js 15.5.16 and 16.2.5. The patches add proper escaping to serialized script content before it is embedded into the rendered document. Refer to the GitHub Security Advisory GHSA-gx5p-jg67-6x7h for the official advisory and patch references.

Workarounds

  • Remove or refactor beforeInteractive script usages so no user-controllable data is serialized into the script body.
  • Apply a strict Content Security Policy that disallows inline scripts without a nonce or hash, reducing the impact of script injection.
  • Sanitize and validate any input that flows into server-rendered components, rejecting characters such as <, >, and / where they are not required.
bash
# Upgrade Next.js to a fixed release
npm install next@15.5.16
# or for the 16.x branch
npm install next@16.2.5

# Verify installed version
npx next --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechNext.js

  • SeverityMEDIUM

  • CVSS Score6.1

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-44581: Next.js App Router Stored XSS Vulnerability

  • CVE-2025-13984: Drupal Next.js XSS Vulnerability

  • CVE-2026-44582: Next.js Cache Poisoning Vulnerability

  • CVE-2026-44578: Next.js SSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English