Code Injection Vulnerability in Contentlayer @contentlayer/core by Contentlayer
CVE-2026-129947
8.6HIGH
What is CVE-2026-129947?
The @contentlayer/core package from Contentlayer up to version 0.3.4 suffers from a code injection vulnerability. This flaw enables malicious actors to inject JavaScript by manipulating content file names, specifically by embedding single quotes. When an attacker crafts a content file name that disrupts the import specifier within the makeDataExportFile() function, it triggers the execution of arbitrary code. This occurs during the import process on a contentlayer development environment or a Next.js development server, posing serious security risks to applications using this package.
Affected Version(s)
@contentlayer/core 0 <= 0.3.4
