CVE-2026-129948 Contentlayer @contentlayer/source-files through 0.3.4 Code Injection via JavaScript Frontmatter
Attackers controlling Markdown or MDX files can run JavaScript during build via frontmatter delimiters, exposing CI secrets; projects using @contentlayer/source-files should care.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Harmful if only installed
- No
- Needs a specific call
- No
- Fix
- None listed
What is CVE-2026-129948?
CVE-2026-129948 is a high-severity code injection vulnerability in contentlayerdev @contentlayer/source-files, published on 16 Nov 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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.
Weakness: CWE-95
Which versions are affected by CVE-2026-129948?
1 open source package ship an affected version, including %40contentlayer/source-files.
An affected version is exposed as installed. No special setting or call is needed.
| Package | Affected | Fixed in |
|---|---|---|
%40contentlayer/source-files npmpkg:npm/%40contentlayer/source-files | All versions to 0.3.4 | None |
How do I fix CVE-2026-129948?
No fix has been published for CVE-2026-129948 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-129948 being exploited?
There is no known exploitation of CVE-2026-129948 in the wild and no public exploit code.
Sources
Also known as GHSA-qp9j-64hv-w35c.