VulnWatch by ve1ve2
high 8.6 EPSS 0.27%

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…

Source:
NVD CVE API 2.0
Published:
Fetched:
Updated:

https://nvd.nist.gov/vuln/detail/CVE-2026-129947 ↗

CWE-94

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. References: https://github.com/contentlayerdev/contentlayer/blob/v0.3.4/packages/@contentlayer/core/src/generation/generate-dotpkg.ts#L377-L379 https://github.com/contentlayerdev/contentlayer/blob/v0.3.4/packages/@contentlayer/core/src/generation/generate-dotpkg.ts#L511 https://github.com/contentlayerdev/contentlayer/issues/688 https://www.vulncheck.com/advisories/contentlayer-contentlayer-core-through-0.3.4-code-injection-via-generated-index-mjs

Linked vulnerabilities (1)

CVE-2026-129947 high 8.6 EPSS 0.27% (p19) NVDCVE.org
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

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.

CWE: CWE-94NVD: Received