Description

HCSEC has disclosed a critical vulnerability tracked as CVE-2026-0969 in next mdx remote versions 4.3.0 through 5.0.0. The flaw carries a CVSS score of 9.8 and allows remote code execution when servers process untrusted MDX content. The issue has been resolved in version 6.0.0 and users are strongly urged to upgrade. Next mdx remote is commonly used in Next.js applications to render MDX content from databases APIs or user submissions. The vulnerability is caused by insufficient sanitization in the serialize and compileMDX functions. Since MDX allows embedded JavaScript expressions inside curly braces attackers can inject malicious code into content that is later rendered on the server. When processed during server side rendering the injected code executes with the same privileges as the hosting server. This could allow attackers to steal sensitive information install malware or fully compromise the system. The risk is especially high for applications that accept user generated content without proper validation or filtering. Version 6.0.0 introduces important security changes. JavaScript expressions are now blocked by default. If developers choose to enable them an additional safeguard blocks dangerous globals such as process eval and require. Organizations handling untrusted MDX should upgrade immediately review their implementation and apply strict sanitization before rendering any user supplied content.