Code injection in Contentlayer source-files via JavaScript frontmatter
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
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| contentlayerdev | @contentlayer/source-files | up to 0.3.4 | — | No fix listed | CNA |
- @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
- 2026-11-16 Threatist record created from CVE-2026-129948
- 2026-11-16 Alias added: GHSA-qp9j-64hv-w35c
References
More contentlayerdev vulnerabilities
- TI-2026-92181 Code injection in Contentlayer core via crafted content file names CVSS 4.0HIGH 8.6
Sources
- CVE-2026-129948 · CVE Program
- CVE-2026-129948 · NVD
- GHSA-qp9j-64hv-w35c · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences