Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
High

Arbitrary Code Execution in next-mdx-remote serialize/compileMDX

IdentifiersCVE-2026-0969CWE-94· Improper Control of Generation of…Also known ashcsec_2026_01

CVE-2026-0969 is an arbitrary code execution vulnerability in the next-mdx-remote library affecting versions 4.3.0 through 5.0.0 (more broadly, 4.3.0 up to but not including 6.0.0 per advisory context). The vulnerable code paths are the serialize and compileMDX functions used to compile MDX content. The flaw is caused by insufficient sanitization of JavaScript expressions embedded in MDX content, particularly expressions placed inside MDX curly-brace syntax. When an application processes untrusted MDX content on the server, attacker-supplied JavaScript can be evaluated during compilation/server-side rendering. Advisory examples indicate dangerous constructs such as eval(), Function(), process, require(), and child_process execution may be reachable. The issue is fixed in next-mdx-remote 6.0.0, which introduces breaking changes including blocking JavaScript expressions by default.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can result in arbitrary/remote code execution in the server environment processing the MDX content. Because the injected code executes in the context of the hosting application, impact can include full compromise of the application process, access to sensitive data available to that process, execution of operating system commands, modification or destruction of application data, service disruption, and potential broader host compromise depending on runtime privileges and deployment architecture.

Mitigation

If you can’t patch tonight, do this now.

Until remediation is complete, do not compile or server-side render untrusted MDX content. Restrict MDX inputs to trusted authors or allowlisted sources only. Prevent untrusted user input from reaching serialize or compileMDX on the server. Where supported, ensure JavaScript expressions are blocked and do not enable blockJS: false unless absolutely necessary. Apply additional sanitization and content-processing controls for MDX inputs, and consider isolating or segmenting any service that must process remotely supplied MDX.

Remediation

Patch, then assume compromise.

Upgrade next-mdx-remote to version 6.0.0 or later. Version 6.0.0 changes the default behavior to block JavaScript expressions via blockJS: true in serialize and compileMDX. If JavaScript expressions must be explicitly enabled with blockJS: false, retain blockDangerousJS: true to apply best-effort filtering of dangerous globals and constructs such as eval, Function, process, and require. Audit all uses of serialize and compileMDX, especially any paths that accept user-generated or remotely sourced MDX, and validate application behavior in staging because 6.0.0 introduces breaking changes.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
HashicorpNext-Mdx-Remoteapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity11

Community discussion across Reddit, Mastodon, and other social sources.