art-template's sub-template resolution logic (src/compile/adapter/resolve-filename.js), used by...
Summary
Path traversal reported (CVE-2026-71215). Confidential information can be exposed externally.
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.
art-templateのinclude・extendで指定するサブテンプレートのパス解決に検証が不足しており、外部入力を指定できる場合に攻撃者がNode.Processからアクセスできる任意のファイルを読み取られるおそれがあります。CVSS v3のスコアは7.5(高)です。修正版の有無については最新の情報を確認してください。
art-templateのサブテンプレート解決ロジックで、絶対パス処理時にディレクトリ外アクセスが可能な問題。
src/compile/adapter/resolve-filename.jsとloader.jsファイル。
攻撃者は任意のファイルを読み取ることができるため、高いリスクです。
ディレクトリ外へのアクセスをチェックし、防ぐコードを追加する必要があります。
入力をサニタイズし、絶対パスを禁止することで一時的な対策を行う。
テンプレート名が外部入力から影響を受けている個所を確認し、パスが予期しないディレクトリに解決されないか確認する。
Original description The description as published by the source.
art-template's sub-template resolution logic (src/compile/adapter/resolve-filename.js), used by both the include() and extend() template directives, resolves the target file path via path.resolve(root, filename) with no check afterward that the result remains inside root. Because path.resolve() discards root entirely when filename is an absolute path, and does not block '../' traversal sequences, and the resolved path is passed directly to fs.readFileSync() in loader.js with its contents compiled and rendered, an application that lets a sub-template name be influenced by external input (e.g. a query parameter passed into {{include page}}) allows an attacker to read arbitrary files on disk that the Node process can access.
Source: NIST National Vulnerability Database NVD GitHub Advisory
References
- web github.com
- web nvd.nist.gov
- web github.com