CVE-2026-129948

8.8High

Published 16 Nov 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite

8.8CVSS

High

0CVSS v3.110

Attack vector
Network
Complexity
Low
Privileges
Low
User action
None
Impact
Full C/I/A compromise
Weakness
CWE-95

What an attacker gets

Attackers who can commit or modify content files can execute arbitrary JavaScript during your build process. This allows them to steal CI build secrets and compromise your deployment pipeline.

Root cause

The library uses gray-matter with its JavaScript engine enabled, which interprets ---js or ---javascript frontmatter as executable code.

Affected versions

@contentlayer/source-files through 0.3.4

CVSS v3.1 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Fix & remediation

Upgrade to a version beyond 0.3.4 if available or audit all content files for malicious frontmatter. If no patch exists, disable JS frontmatter support in your gray-matter configuration or restrict file access to trusted contributors only.

remediation — bash
$ npm list @contentlayer/source-files

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD 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.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-129948