Contentlayer @contentlayer/source-files through 0.3.4 Code Injection via JavaScript Frontmatter

State
Published
Severity
8.7 High
Published
Nov 16, 2026
Updated
Nov 17, 2026
Reserved
Nov 16, 2026

Read the record on cve.org

Description

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.

ProductVersions
@contentlayer/source-files contentlayerdev0.3.4 and earlier Affected

Weaknesses

  • CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.