Code Injection Vulnerability in Contentlayer Affected Products by Contentlayer
CVE-2026-129948
8.7HIGH
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
