Contentlayer core ファイル名経由でコードを注入される脆弱性
Summary
@contentlayer/core の0.3.4以前に、コンテンツファイル名に含まれる単一引用符からJavaScriptを注入される脆弱性が見つかりました。contentlayer devやNext.jsの開発サーバーが生成されたモジュールを読み込んだときに、注入されたコードが実行されるおそれがあります。修正版の情報は公開されていないため、最新の情報を確認してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
@contentlayer/core の0.3.4以前に、コンテンツファイル名に含まれる単一引用符からJavaScriptを注入される脆弱性が見つかりました。contentlayer devやNext.jsの開発サーバーが生成されたモジュールを読み込んだときに、注入されたコードが実行されるおそれがあります。修正版の情報は公開されていないため、最新の情報を確認してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| contentlayerdev@contentlayer/core |
≤ 0.3.4→ Not listed |
Not listed |
This record does not list fixed versions. Check the article or the vendor advisory in the references for whether and where it is fixed.
Original description The description as published by the source.
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.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory vulncheck.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- report github.com
- web github.com
- web github.com
- web github.com