Description
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.
Published: 2026-08-05
Score: 7.5 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability is a path‑traversal flaw in art‑template's sub‑template resolution logic. By supplying a template name that contains '../' or an absolute path to the include() or extend() directives, an attacker can cause the library to resolve a file outside the intended root directory and read its contents via fs.readFileSync. The impact is the remote read of arbitrary files accessible to the Node.js process, which constitutes a confidentiality breach. The CVSS score of 7.5 indicates high severity for this capability.

Affected Systems

The flaw affects the art‑template library. No specific version range is identified in the CNA data, so any deployment that uses art‑template and has not been updated with the latest patch may be vulnerable. All users of versions older than the last fix should consider themselves impacted.

Risk and Exploitability

The CVSS score of 7.5 reflects high severity. EPSS is not available, and the vulnerability is not listed in CISA's KEV catalog. The likely attack vector involves an attacker influencing the template name parameter—such as a query string that is passed directly to {{include page}}—without proper validation. Successful exploitation requires that the Node.js process has read access to the target files; no authentication or elevated privileges are required beyond the process's inherent permissions.

Generated by OpenCVE AI on August 5, 2026 at 08:35 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest release of art-template that includes the path‑resolution fix.
  • If an upgrade is not possible, validate and sanitize all values used with the include() and extend() directives to ensure only whitelisted template names are accepted and that the resolved path remains inside the intended directory.
  • Audit the application code to locate all usage of include() and extend(), restrict them to trusted paths, or remove the capability entirely if it is not required.

Generated by OpenCVE AI on August 5, 2026 at 08:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

References
History

Wed, 05 Aug 2026 07:30:00 +0000

Type Values Removed Values Added
Description 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.
Title art-template: Path Traversal in Sub-Template Resolution via include()/extend()
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-05T06:59:35.983Z

Reserved: 2026-08-05T06:56:15.799Z

Link: CVE-2026-71215

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-05T08:45:16Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')