CVE-2026-129947
published high CVSS 4.0 · 8.6Contentlayer @contentlayer/core through 0.3.4 Code Injection via Generated _index.mjs
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| contentlayerdev | — | @contentlayer/core0 through 0.3.4 · Other versions: unaffected | Affected | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.6 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.0 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| contentlayerdev | @contentlayer/core | 0 through 0.3.4 (affected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
4- https://github.com/contentlayerdev/contentlayer/blob/v0.3.4/packages/@contentlayer/core/src/generation/generate-dotpkg.ts#L377-L379
- https://github.com/contentlayerdev/contentlayer/blob/v0.3.4/packages/@contentlayer/core/src/generation/generate-dotpkg.ts#L511
- https://github.com/contentlayerdev/contentlayer/issues/688
- VulnCheck Advisory: Contentlayer @contentlayer/core through 0.3.4 Code Injection via Generated _index.mjs https://www.vulncheck.com/advisories/contentlayer-contentlayer-core-through-0.3.4-code-injection-via-generated-index-mjs
Provider assertions
2VulnCheck · cna
Contentlayer @contentlayer/core through 0.3.4 Code Injection via Generated _index.mjs
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 1b72643deb77227991d02e6eac21dc5ac5681fd7c7ab66f25d8f22c60d01a156
- Ingested
- 18 Nov 2026, 15:18:32 UTC
- Source record
- Official CVE record