Code Injection Vulnerability in Contentlayer Affected Products by Contentlayer
CVE-2026-129948

8.7HIGH

Key Information:

Vendor
CVE Published:
16 November 2026

What is CVE-2026-129948?

The @contentlayer/source-files package, up to version 0.3.4, contains a code injection vulnerability that can be exploited by attackers controlling content files. By leveraging the enabled JavaScript engine within gray-matter's parseMarkdown() function, attackers can inject harmful JavaScript code. This is achieved by starting Markdown or MDX files with a frontmatter delimiter of ---js or ---javascript. Such an attack could lead to the unauthorized execution of code during the build process, potentially revealing sensitive continuous integration (CI) secrets.

Affected Version(s)

@contentlayer/source-files 0 <= 0.3.4

References

CVSS V4

Score:
8.7
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
None

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Ikram-4
.