Remote code execution via unrestricted template extensions
Published May 19, 2023 · Updated Feb 12, 2025
Template injection in Craft CMS 4.0.0 through 4.4.5 allows remote authenticated users to execute code through an uploaded template. View::_resolveTemplate returns an existing named file before checking defaultTemplateExtensions, causing arbitrary extensions to render as Twig templates. Exploitation requires an administrator account and ALLOW_ADMIN_CHANGES enabled, as in development or misconfigured staging or production environments, and grants host operating-system access.
Summary
What happened
Template injection in Craft CMS 4.0.0 through 4.4.5 allows remote authenticated users to execute code through an uploaded template. View::_resolveTemplate returns an existing named file before checking defaultTemplateExtensions, causing arbitrary extensions to render as Twig templates. Exploitation requires an administrator account and ALLOW_ADMIN_CHANGES enabled, as in development or misconfigured staging or production environments, and grants host operating-system access.
The record
- CVE
- CVE-2023-32679
- Published
- May 19, 2023
- Updated
- Feb 12, 2025
- Vendor
- Pixel & Tonic
- Product
- Craft CMS
- Classifications
- CWE-1336, CWE-74, CWE-253, CWE-434, T1059.004
- Attack vector
- network
- Privileges
- admin
Timeline
How it unfolded
- May 19, 2023CVE publishedPublication date reported by the CVE source.
- Feb 12, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=>= 4.0.0, < 4.4.6
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Vendor advisory proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo