Skip to content
RCE Write-up Intermediate

CVE-2025–8723 — Critical RCE in WordPress Cloudflare Imag

The Cloudflare Image Resizing WordPress plugin wrote an attacker-supplied site URL value directly into its config.php file without sanitisation, letting an unauthenticated attacker break out of the PHP string and inject code. This could lead to full site takeover through remote code execution.

Sector Cyber Security Follow

Published on medium.com

On January 2025, a critical vulnerability was disclosed in the Cloudflare Image Resizing WordPress plugin (≤ v1.5.6). Identified as CVE-2025–8723, this flaw allows unauthenticated Remote Code Execution (RCE) — enabling attackers to take full control of vulnerable websites.

Sector Cyber Security, 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

The plugin used attacker-controlled input in a regular expression replacement on config.php without sanitisation or escaping, allowing PHP string breakout and code injection.

Impact

An unauthenticated attacker could inject arbitrary PHP code into config.php, potentially leading to a webshell and full site takeover.

What the attacker needed

Cloudflare Image Resizing plugin ≤ v1.5.6; REST API accessible

The fix

The issue was fixed in v1.5.7 by removing the vulnerable REST hook and disabling REST API exposure of plugin options, so configuration changes require admin authentication.

How it was found

  1. Send a request to the WordPress REST settings endpoint with a crafted cf_image_resizing_siteurl value.
  2. The plugin's hook_rest_pre_dispatch function reads that value and writes it into config.php.
  3. The injected PHP code is saved in config.php and executes when the file loads.

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.

A WordPress plugin saves a setting by editing a PHP configuration file. It pasted whatever the user sent straight into that file without cleaning it, so an attacker could send extra PHP code that gets saved and later runs on the server. That means an outsider could run their own code on the website.

What is RCE?

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

More by Sector Cyber Security

View all

2 more disclosed reports, best first.

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.