RCE in Contentlayerdev @Contentlayer/core
CVE-2026-129947
Contentlayer @contentlayer/core through 0.3.4 contains a code injection vulnerability that allows attackers to inject JavaScript by embedding single quotes in content file names. Attackers can add a content file whose name breaks out of the import specifier in makeDataExportFile(), executing injected code when contentlayer dev or a Next.js dev server imports the generated module.
Vulnerability class: RCE (Remote Code Execution)
Published .
CVSS v3 metric
CVSS v3 base score 8.0 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H.
EPSS exploit prediction
FIRST.org has not scored this CVE yet. About EPSS.
Affected products
Weakness classification (CWE)
References
- github.com/contentlayerdev/contentlayer/blob/v0.3.4/packages/@contentlayer/core… (technical-description)
- github.com/contentlayerdev/contentlayer/blob/v0.3.4/packages/@contentlayer/core… (technical-description)
- github.com/contentlayerdev/contentlayer/issues/688 (issue-tracking)
- www.vulncheck.com/advisories/contentlayer-contentlayer-core-through-0.3.4-code-… (third-party-advisory)