# Contentlayer frontmatter can execute code inside the build

Source: [DEV Community: javascript](https://dev.to/kozhevniko/contentlayer-frontmatter-can-execute-code-inside-the-build-2d87) · 2026-11-24 · Frontend
Page: https://themorning.dev/story/contentlayer-frontmatter-can-execute-code-inside-the-build-864c832c41828460
Kind: security · Impact: high

## In brief

- CVE-2026-129948 affects @contentlayer/source-files through version 0.3.4.
- The package processes Markdown through a path where gray-matter's JavaScript engine stays enabled.
- A person who controls Markdown content can execute code during the build.

## Why it matters

If your build processes Markdown you do not fully control, frontmatter could run arbitrary code on your build machine or CI runner.

## What to do

- Check whether your project uses @contentlayer/source-files version 0.3.4 or earlier

## Versions

- @contentlayer/source-files through 0.3.4

## CVEs

- CVE-2026-129948

## Coverage

- [Contentlayer frontmatter can execute code inside the build](https://dev.to/kozhevniko/contentlayer-frontmatter-can-execute-code-inside-the-build-2d87) — DEV Community: javascript, 2026-11-24

Tags: security, contentlayer, markdown, gray-matter, build-tools

---

Brief generated by AI (claude-haiku-5-5) from the reporting listed under Coverage. Headlines belong to their publishers. The Morning Dev – https://themorning.dev
