CVE-2026-28697
published 2026-03-04CVE-2026-28697: Craft is a content management system (CMS). Prior to 4.17.0-beta.1 and 5.9.0-beta.1, an authenticated administrator can achieve Remote Code Execution (RCE) by…
PriorityP260critical9.1CVSS 3.1
AVNACLPRHUINSCCHIHAH
EPSS
1.07%
60.5th percentile
Craft is a content management system (CMS). Prior to 4.17.0-beta.1 and 5.9.0-beta.1, an authenticated administrator can achieve Remote Code Execution (RCE) by injecting a Server-Side Template Injection (SSTI) payload into Twig template fields (e.g., Email Templates). By calling the craft.app.fs.write() method, an attacker can write a malicious PHP script to a web-accessible directory and subsequently access it via the browser to execute arbitrary system commands. This vulnerability is fixed in 4.17.0-beta.1 and 5.9.0-beta.1.
Affected
8 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| craftcms | cms | — | — |
| craftcms | cms | — | — |
| craftcms | cms | >= 4.0.0-RC1 < 4.17.0-beta.1 | 4.17.0-beta.1 |
| craftcms | cms | >= 5.0.0-RC1 < 5.9.0-beta.1 | 5.9.0-beta.1 |
| craftcms | craft_cms | < 4.17.0 | 4.17.0 |
| craftcms | craft_cms | < 5.9.0 | 5.9.0 |
| craftcms | craft_cms | — | — |
| craftcms | craft_cms | — | — |
Detection & IOCsextracted from sources · hover to see the quote
- →Look for SSTI payloads injected into Twig template fields (e.g., Email Templates) in Craft CMS, particularly calls to the `craft.app.fs.write()` method which can be used to write malicious PHP scripts to web-accessible directories. ↗
- →Monitor web server access logs for HTTP requests to newly created or unexpected PHP files in web-accessible directories, which may indicate a dropped webshell following exploitation. ↗
- ·The vulnerability requires an authenticated administrator account to exploit; unauthenticated exploitation is not possible. Scope detection efforts accordingly — focus on admin-level session activity and template modification events. ↗
- ·Affected versions are Craft CMS prior to 4.17.0-beta.1 and 5.9.0-beta.1. Instances running these or earlier versions of the craftcms/cms package should be prioritized for patching and monitoring. ↗
CVSS provenance
nvdv3.19.1CRITICALCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
nvdv4.09.4CRITICALCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/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
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Craft CMS Vulnerable to Authenticated RCE via "craft.app.fs.write()" in Twig Templates
ghsa·2026-03-03
CVE-2026-28697 [CRITICAL] CWE-1336 Craft CMS Vulnerable to Authenticated RCE via "craft.app.fs.write()" in Twig Templates
Craft CMS Vulnerable to Authenticated RCE via "craft.app.fs.write()" in Twig Templates
## Summary
An authenticated administrator can achieve Remote Code Execution (RCE) by injecting a Server-Side Template Injection (SSTI) payload into Twig template fields (e.g., Email Templates). By calling the `craft.app.fs.write()` method, an attacker can write a malicious PHP script to a web-accessible directory and subsequently access it via the browser to execute arbitrary system commands.
---
## Proof of Concept
### Attack Prerequisites
- Authenticated administrator account with `allowAdminChanges` enabled, or access to the System Messages utility
### Steps to Reproduce
1. Navigate to **Utilities → System Messages** (`/admin/utilities/system-messages`)
2. Edit any email template (e.g., "Test E
OSV
Craft CMS Vulnerable to Authenticated RCE via "craft.app.fs.write()" in Twig Templates
osv·2026-03-03
CVE-2026-28697 [CRITICAL] Craft CMS Vulnerable to Authenticated RCE via "craft.app.fs.write()" in Twig Templates
Craft CMS Vulnerable to Authenticated RCE via "craft.app.fs.write()" in Twig Templates
## Summary
An authenticated administrator can achieve Remote Code Execution (RCE) by injecting a Server-Side Template Injection (SSTI) payload into Twig template fields (e.g., Email Templates). By calling the `craft.app.fs.write()` method, an attacker can write a malicious PHP script to a web-accessible directory and subsequently access it via the browser to execute arbitrary system commands.
---
## Proof of Concept
### Attack Prerequisites
- Authenticated administrator account with `allowAdminChanges` enabled, or access to the System Messages utility
### Steps to Reproduce
1. Navigate to **Utilities → System Messages** (`/admin/utilities/system-messages`)
2. Edit any email template (e.g., "Test E
No detection rules found.
No public exploits indexed.
2026-03-04
Published