Skip to content
RCE Write-up Advanced

Craft CMS Zero-Day Exploit Chain Leads to RCE and Data Theft

A chain of flaws in Craft CMS let unauthenticated attackers inject code into templates, write a malicious PHP file to the server and then run commands, which was used in the wild to steal data before a patch existed. The text gives only a high-level outline of the stages and no technical detail.

medium.com

Published on medium.com

A newly discovered remote code execution (RCE) exploit chain targeting the popular Craft CMS has surfaced, shaking up the security landscape for content management systems. According to a recent BleepingComputer report, this zero-day vulnerability was actively exploited in the wild to steal sensitive data from…

Infoziant, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a template rendering feature that accepted attacker-controlled input without proper authorisation or sandboxing, allowing code to be written to disk and executed.

Impact

Attackers could run arbitrary commands on unpatched servers and steal sensitive data such as customer information and admin credentials.

What the attacker needed

Unpatched Craft CMS instance; no authentication needed

The fix

Craft CMS released a security update and users should update immediately, restrict access to template rendering and add monitoring.

How it was found

  1. Inject malicious code into templates to bypass authentication.
  2. Use the injected template code to write a malicious PHP file to the server.
  3. Use the placed PHP file to execute arbitrary commands on the server.
  4. Download database content or upload tools for persistent access.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Craft CMS is software for building websites. A flaw in how it processed page templates let an outsider slip in code, save a harmful file on the server and then run their own commands there, which is called remote code execution. Attackers did this to real sites to take data before a fix was available.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.