Read the docs

Code injection in Contentlayer core via crafted content file names

Priority MEDIUM 52CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
Passive
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
No fix listed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.

Summary

Contentlayer @contentlayer/core through 0.3.4 contains a code injection flaw (CWE-94) that lets attackers inject JavaScript by embedding single quotes in content file names. A file whose name breaks out of the import specifier in makeDataExportFile() runs the injected code when contentlayer dev or a Next.js dev server imports the generated module. The CVSS 4.0 base score is 8.6 (HIGH).

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

Description from the CNA

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.

Why it matters now

Fix No fix listed No fixed version in the sources yet

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
contentlayerdev@contentlayer/coreup to 0.3.4—No fix listedCNA
  • @contentlayer/core Vendorcontentlayerdev Affected up to 0.3.4 Fixed in — No fix listed CNA

Remediation

No fixed version is listed for @contentlayer/core, and all versions through 0.3.4 are affected.

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

Timeline

  1. 2026-11-16 Threatist record created from CVE-2026-129947
  2. 2026-11-16 Alias added: GHSA-gxcv-hr94-jjmj

References

  • TI-2026-92182 Code injection in Contentlayer source-files via JavaScript frontmatter CVSS 4.0HIGH 8.7

Sources