# CVE-2026-129947: Contentlayer @contentlayer/core through 0.3.4 Code Injection via Generated _index.mjs

- Severity: High 8.6 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 29% of CVEs (2026-12-01)
- Published: 2026-11-16T15:06:10.622Z
- Modified: 2026-11-18T15:17:40.633Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: 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.

(As written by CVE List.)

## Affected

- contentlayerdev @contentlayer/core: up to 0.3.4

## Every score

- VulnCheck: CVSS:4.0 8.6 High `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`
- VulnCheck: CVSS:3.1 8.0 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/contentlayerdev/contentlayer/issues/688> (issue-tracking)
- <https://github.com/contentlayerdev/contentlayer/blob/v0.3.4/packages/@contentlayer/core/src/generation/generate-dotpkg.ts#L377-L379> (technical-description)
- <https://github.com/contentlayerdev/contentlayer/blob/v0.3.4/packages/@contentlayer/core/src/generation/generate-dotpkg.ts#L511> (technical-description)
- <https://www.vulncheck.com/advisories/contentlayer-contentlayer-core-through-0.3.4-code-injection-via-generated-index-mjs> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-129947](https://www.cve.org/CVERecord?id=CVE-2026-129947), CVE Terms of Use, modified 2026-11-18
- NVD: [CVE-2026-129947](https://nvd.nist.gov/vuln/detail/CVE-2026-129947), Public domain, modified 2026-11-18

---

Page: https://cve.day/CVE-2026-129947 · Whole record: https://cve.day/CVE-2026-129947.json · Rebuilt by cve.day 2026-11-25T22:59:50.890Z
