CVE-2026-129947

8.0High

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

8.0CVSS

High

0CVSS v3.110

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

What an attacker gets

Authenticated attackers can execute arbitrary JavaScript by crafting malicious content file names. This requires a user or build process to trigger the contentlayer dev or Next.js development server.

Root cause

The makeDataExportFile function fails to sanitize single quotes in file names, allowing them to break out of the generated import specifier.

Affected versions

@contentlayer/core through 0.3.4

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

Fix & remediation

Upgrade to a version beyond 0.3.4 if available or sanitize all content file names to exclude single quotes. If no patch is available, restrict access to the file system where content files are managed.

remediation — bash
$ npm list @contentlayer/core

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

NVD description

Contentlayer @contentlayer/core through 0.3.4 contains a code injection vulnerability that allows attackers to inject JavaScript by embedding single quotes in content file names. Attackers can add a content file whose name breaks out of the import specifier in makeDataExportFile(), executing injected code when contentlayer dev or a Next.js dev server imports the generated module.

References

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