All vulnerabilities

npm

CVE-2026-129947

Contentlayer @contentlayer/core through 0.3.4 Code Injection via Generated _index.mjs

Severity
High 8.6
Published
16 Nov 2026
Last changed
18 Nov 2026
Added to UpHeron
23 Nov 2026
Exploit chance
0.3% in the next 30 daysHigher than 19% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Code injection (CWE-94)
Attack
Over the network · Needs a user account · Needs someone to view a page or file
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Sources
CVE Program

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.

From the CVE Program.

Affected software

SoftwareAffected versions
@contentlayer/corenpm · osv:npm:@contentlayer/core
  • Every version up to 0.3.4

About @contentlayer/core

Weekly downloads (npm)
24,339npm, 23 Nov 2026

This is the only vulnerability in @contentlayer/core in our list.

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-129947