Read the docs

Code injection in Contentlayer source-files via JavaScript frontmatter

Priority MEDIUM 53CWE-95Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
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-95.

Summary

Contentlayer @contentlayer/source-files through 0.3.4 contains a code injection flaw (CWE-95) in parseMarkdown(). The gray-matter JavaScript engine stays enabled, so a Markdown or MDX file that starts with a ---js or ---javascript frontmatter delimiter runs JavaScript during the build. An attacker who controls content files can run code in the build and expose CI build secrets.

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

Description from the CNA

Contentlayer @contentlayer/source-files through 0.3.4 contains a code injection vulnerability that allows attackers who control content files to execute JavaScript by abusing gray-matter's still-enabled JavaScript engine in parseMarkdown(). Attackers can start a Markdown or MDX file with a ---js or ---javascript frontmatter delimiter to run code during build, exposing CI build secrets.

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/source-filesup to 0.3.4—No fix listedCNA
  • @contentlayer/source-files Vendorcontentlayerdev Affected up to 0.3.4 Fixed in — No fix listed CNA

Remediation

The sources list no fixed version for @contentlayer/source-files.

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

Timeline

  1. 2026-11-16 Threatist record created from CVE-2026-129948
  2. 2026-11-16 Alias added: GHSA-qp9j-64hv-w35c

References

  • TI-2026-92181 Code injection in Contentlayer core via crafted content file names CVSS 4.0HIGH 8.6

Sources