CVE-2026-129947 PUBLISHED

Contentlayer @contentlayer/core through 0.3.4 Code Injection via Generated _index.mjs

Assigner: VulnCheck
Reserved: 16.11.2026 Published: 16.11.2026 Updated: 16.11.2026

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.

Metrics

CVSS Vector: 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
CVSS Score: 8.6

Product Status

Vendor contentlayerdev
Product @contentlayer/core
Versions Default: unaffected
  • affected from 0 to 0.3.4 (incl.)

Credits

  • Ikram-4 finder

References

Problem Types

  • Improper Control of Generation of Code ('Code Injection') CWE