CVE-2026-129947 · Package
NO FIX YET · SEE WHAT TO DO
Contentlayer's core package builds an import line from content file names without escaping single quotes. An attacker who can add a content file can break out of that import and run JavaScript when the dev server imports the generated module.
first public Nov 16, 2026 · 1 source
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Projects that use Contentlayer's core package through version 0.3.4 and run its dev server, where a file name in the content directory is attacker-controlled. Production builds and projects where only trusted authors add content are less exposed. The sources do not say whether production builds are affected.
Not affected if production-only, trusted-content-authors
Who cares contentlayer, next.js, node
npm ls @contentlayer/corecontentlayer dev or a Next.js dev server that uses Contentlayer@contentlayer/core past 0.3.4; the sources do not name the fixed versionContentlayer @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.
This page as .md · .json · 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.