CVE-2026-0969
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-0969 is an arbitrary code execution vulnerability in the serialize function of the next-mdx-remote npm package, caused by insufficient sanitization of MDX content during compilation. It affects all versions of next-mdx-remote prior to 6.0.0 and is classified under CWE-94 (Improper Control of Generation of Code). The vulnerability was published on February 12, 2026, and carries a CVSS v3.1 base score of 8.8 (High), requiring only low privileges and no user interaction for network-based exploitation (Red Hat CVE, Socket.dev Blog).

Technical details

The root cause is CWE-94 (Code Injection): the serialize function in next-mdx-remote compiles MDX content into executable React components without adequately sanitizing or restricting the input, allowing embedded JavaScript expressions or imports within MDX to be evaluated server-side. An attacker with low-level access (e.g., the ability to supply or influence MDX content processed by the server) can craft malicious MDX payloads that execute arbitrary code during the React Server-Side Rendering (SSR) phase. The attack vector is network-accessible, requires low privileges, and has no user interaction requirement. A technical write-up detailing the exploitation mechanics in the context of React SSR is available from Infinit Security (Infinit Security).

Impact

Successful exploitation allows a low-privileged attacker to execute arbitrary code on the server hosting the Next.js application, resulting in high confidentiality, integrity, and availability impact. An attacker could exfiltrate sensitive data, modify application content or server files, disrupt service availability, and potentially pivot to other internal systems from the compromised server. Applications that process user-supplied or externally sourced MDX content via next-mdx-remote are at greatest risk (Red Hat CVE, Socket.dev Blog).

Exploitability

As of the time of disclosure, no public proof-of-concept exploit code has been observed, and there is no confirmed evidence of in-the-wild exploitation (Red Hat CVE). The EPSS score is approximately 0.071% (0.000710), indicating a currently low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Notably, Vercel has taken a proactive platform-level response by blocking new deployments using vulnerable versions of next-mdx-remote by default (Vercel Changelog).

Exploitation steps

  1. Identify target: Locate a web application using next-mdx-remote versions prior to 6.0.0 that processes MDX content supplied or influenced by the attacker (e.g., a CMS, documentation site, or blog platform accepting user-submitted MDX).
  2. Craft malicious MDX payload: Construct an MDX document containing embedded JavaScript that executes arbitrary code, such as importing Node.js built-in modules (e.g., child_process) or using JSX expressions to invoke system commands. Example concept: embedding export const exec = require('child_process').execSync('id') within the MDX content.
  3. Submit payload for serialization: Deliver the crafted MDX content to the application endpoint that invokes next-mdx-remote's serialize function — this could be via a form submission, API call, or by modifying a content source the server fetches.
  4. Trigger server-side execution: When the server calls serialize() on the malicious MDX, the insufficient sanitization allows the embedded code to execute in the Node.js server context during SSR, achieving arbitrary code execution as the application's service account.
  5. Post-exploitation: Use the code execution foothold to establish persistence, exfiltrate data, or move laterally within the server environment (Infinit Security, Socket.dev Blog).

Indicators of compromise

  • Logs: Unexpected Node.js errors or stack traces in application logs related to MDX compilation or next-mdx-remote's serialize function; unusual server-side rendering errors coinciding with MDX content submissions.
  • Process: Unusual child processes spawned by the Node.js application process (e.g., sh, bash, curl, wget, python) that are not part of normal application behavior.
  • Network: Unexpected outbound connections from the application server to external IPs, particularly following MDX content submission events; DNS lookups for unfamiliar domains originating from the Node.js process.
  • File System: New or modified files in the application directory or /tmp created by the Node.js process; presence of web shells, reverse shell scripts, or unauthorized cron jobs added under the application service account.
  • Application Behavior: Anomalous MDX content submissions containing JavaScript require() calls, import statements referencing Node.js built-ins (e.g., child_process, fs), or encoded payloads in content fields processed by next-mdx-remote.

Mitigation and workarounds

The primary remediation is to upgrade next-mdx-remote to version 6.0.0 or later, which contains the fix for this vulnerability (Red Hat CVE, Socket.dev Blog). As a workaround where immediate upgrade is not possible, restrict or eliminate the ability for untrusted users to supply MDX content that is processed server-side, and implement strict input validation and content security policies for any MDX processing pipeline. Vercel has also implemented a platform-level control that blocks new deployments using vulnerable versions by default (Vercel Changelog). Audit all deployments running versions prior to 6.0.0 and monitor application logs for suspicious code execution patterns.

Community reactions

Socket.dev published a detailed blog post disclosing the vulnerability and highlighting the risk of RCE via unsanitized MDX content in server-side rendering contexts (Socket.dev Blog). Vercel responded proactively by blocking new deployments with vulnerable versions of next-mdx-remote on its platform by default, signaling the seriousness of the issue (Vercel Changelog). Security news outlets including GBHackers, CyberSecurityNews, and The Hacker News covered the vulnerability in their weekly recaps, and community discussion was observed on Bluesky and LinkedIn. Red Hat also tracked the CVE in its security advisory database (Red Hat CVE).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-55157HIGH8.4
  • JavaScript logoJavaScript
  • @ooples/token-optimizer-mcp
NoYesAug 14, 2026
CVE-2026-35219HIGH7.1
  • JavaScript logoJavaScript
  • @budibase/server
NoYesAug 14, 2026
CVE-2026-55156MEDIUM5.3
  • JavaScript logoJavaScript
  • @ooples/token-optimizer-mcp
NoYesAug 14, 2026
CVE-2026-50029MEDIUM5.3
  • JavaScript logoJavaScript
  • js-toml
NoYesAug 14, 2026
CVE-2026-73428MEDIUM4.6
  • JavaScript logoJavaScript
  • trix
NoYesAug 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management