Security Digest · Vulnerability record
CVE-2026-28697: Craft CMS Vulnerable to Authenticated RCE via "craft.app.fs.write()" in Twig Templates
Craft is a content management system (CMS).
CVSS 9.4 Critical EPSS 1.2% · p67
Should you act?
Critical, preconditions apply
Severe if exploited, but exploitation needs conditions that may not apply to you. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 1.2%, percentile 67: FIRST’s model estimates a 1.2% chance of exploitation activity in the next 30 days, higher than 67% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Needs an account (high (admin)). Exposure depends on who can log in.
- Only applies if your dependency tree includes
craftcms/cms(Composer (PHP)) >= 5.0.0-RC1, < 5.9.0-beta.1, fixed in 5.9.0-beta.1;craftcms/cms(Composer (PHP)) >= 4.0.0-RC1, < 4.17.0-beta.1, fixed in 4.17.0-beta.1. Check your lockfile, including transitive dependencies.
What it is
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.
From the GitHub advisory
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
Weakness type: CWE-1336.
Product: craftcms/cms (Composer (PHP)) · Assigned by: GitHub_M · Published: 2026-03-04
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| Composer (PHP) | craftcms/cms | >= 5.0.0-RC1, < 5.9.0-beta.1 | 5.9.0-beta.1 |
| Composer (PHP) | craftcms/cms | >= 4.0.0-RC1, < 4.17.0-beta.1 | 4.17.0-beta.1 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| craftcms | cms | >= 5.0.0-RC1, < 5.9.0-beta.1, >= 4.0.0-RC1, < 4.17.0-beta.1 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 4.0 | 9.4 Critical | CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
| GitHub | 4.0 | 9.4 | CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Attack requirements: none
- Privileges required: high (admin)
- User interaction: none
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc, automatable no, technical impact total.
- FIRST EPSS (model of 2026-10-21): 1.16% probability of exploitation activity in the next 30 days; percentile 67.
Timeline
- — GitHub-reviewed advisory GHSA-v47q-jxvr-p68x published (critical)
- — CVE record published by GitHub_M
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-v47q-jxvr-p68x github.com
- CVE.org record CVE-2026-28697 cve.org
- NVD entry CVE-2026-28697 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
Critical Composer (PHP) advisories · Today’s Security Digest