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

High 8.6 Published Updated

Attackers can embed quotes in content file names so generated modules execute injected JavaScript when dev or Next.js dev servers import them.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Harmful if only installed
No
Needs a specific call
No
Fix
None listed

What is CVE-2026-129947?

CVE-2026-129947 is a high-severity code injection vulnerability in contentlayerdev @contentlayer/core, published on 16 Nov 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-94

Which versions are affected by CVE-2026-129947?

1 open source package ship an affected version, including %40contentlayer/core.

An affected version is exposed as installed. No special setting or call is needed.

PackageAffectedFixed in
%40contentlayer/core npm
pkg:npm/%40contentlayer/core
All versions to 0.3.4None

How do I fix CVE-2026-129947?

No fix has been published for CVE-2026-129947 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-129947 being exploited?

There is no known exploitation of CVE-2026-129947 in the wild and no public exploit code.

Sources

Also known as GHSA-gxcv-hr94-jjmj.

Is CVE-2026-129947 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free