Skip to main content
VulnerabilityPublished Updated

CVE-2026-28697: craftcms cms · Template Injection

Affects craftcms cmsSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 9.4 Critical : upgrade to 5.9.0-beta.1 or 4.17.0-beta.1 as a priority.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 4.0 base score
9.4Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.1% chance of exploitation in 30 days – higher than 65% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 5.9.0-beta.1, 4.17.0-beta.1
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 4 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade craftcms cms to 5.9.0-beta.1 or 4.17.0-beta.1.

Affected software

ProductAffectedFixed in
craftcmscmsAffected
  • >=5.0.0-RC1 <5.9.0-beta.1
Fixed in
  • 5.9.0-beta.1
craftcmscmsAffected
  • >=4.0.0-RC1 <4.17.0-beta.1
Fixed in
  • 4.17.0-beta.1
GitHubcraftcms/cmspkg:github/craftcms/cmsOther threatsAffected
  • =4.17.0-beta.1
  • =5.9.0-beta.1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

To mitigate CVE-2026-28697, organizations should immediately upgrade Craft CMS to version 4.17.0-beta.1, 5.9.0-beta.1, or later stable releases where the vulnerability is patched. Additionally, restrict administrator access strictly to trusted personnel and enforce strong authentication mechanisms such as multi-factor authentication (MFA) to reduce the risk of credential compromise. Review and audit template fields, especially Email Templates, for suspicious or unauthorized changes. Implement web application firewalls (WAFs) with rules to detect and block SSTI payload patterns targeting Twig templates. Limit write permissions on web-accessible directories to prevent unauthorized file creation. Monitor logs for unusual file writes or execution attempts. Conduct regular security assessments and penetration tests focusing on template injection and code execution vectors. Educate administrators on secure template management practices and the risks of injecting untrusted input into templates. Finally, maintain an incident response plan to quickly address potential exploitation attempts.

Description

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.

References

Community reviews

Loading reviews…