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

Published Nov 16, 2026
·
Updated

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.

Affected Software

1 affected component
npm/@contentlayer/core<=0.3.4

Event History

Nov 16, 2026
CVE Published
via MITRE·03:06 PM
Data Sourced
via MITRE·03:06 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this issue?

An attacker needs the ability to add or cause the addition of a content file with a crafted filename containing single quotes. The vulnerable generated module is then imported by contentlayer dev or a Next.js development server.

2

Is user interaction required for exploitation?

Yes. The supplied severity vector indicates user interaction is required. The available description identifies the triggering action as importing the generated module through contentlayer dev or a Next.js dev server.

3

Which environments are specifically identified as affected?

The described execution path occurs when contentlayer dev or a Next.js development server imports the generated _index.mjs module. The provided data does not establish impact for production server workflows.

4

How can I determine whether my project is exposed?

Check whether it uses @contentlayer/core through version 0.3.4 and whether untrusted parties can introduce content files or influence their filenames. Filesystem content names containing single quotes are the relevant injection condition.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203