CVE-2026-9860: Cloudflare Images WordPress Plugin Remote Code Execution Vulnerability
The Cloudflare Images plugin for WordPress contains a critical flaw that allows authors and editors to execute arbitrary code on a website by manipulating a setup parameter. The vulnerability exists because the plugin fails to properly restrict who can modify the WordPress configuration file, and it doesn't adequately escape user input containing single quotes. An attacker with author-level permissions can exploit this during the plugin setup process to inject malicious code directly into the site's core configuration, gaining full server access.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-434
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-18 / 2026-06-18
NVD description (verbatim)
The Offload, AI & Optimize with Cloudflare Images plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1.10.2 via the 'account-id' parameter parameter. This is due to insufficient privilege enforcement on the cf_images_do_setup AJAX handler, which requires only the upload_files capability (Author+) rather than manage_options before writing to wp-config.php, combined with the absence of single-quote escaping — sanitize_text_field() does not strip single quotes, and filter_input(INPUT_POST) bypasses wp_magic_quotes() slashing — allowing a single quote in the account-id or api-key parameter to break out of the single-quoted PHP string literal in the write_config() define() statement. This makes it possible for authenticated attackers, with author-level access and above, to execute code on the server. This is possible because the 'cf-images-nonce' nonce required by the AJAX handler is exposed to all Author-level and above users on wp-admin/upload.php via the CFImages JavaScript object, meaning any upload-capable user can satisfy the nonce check and reach the vulnerable wp-config.php write path.
6 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-9860 is a Remote Code Execution vulnerability in the Offload, AI & Optimize with Cloudflare Images plugin affecting all versions through 1.10.2. The cf_images_do_setup AJAX handler enforces only the upload_files capability (Author+) instead of manage_options, allowing insufficiently privileged users to write to wp-config.php. The vulnerability combines two weaknesses: (1) the nonce cf-images-nonce is exposed to all Author+ users via the CFImages JavaScript object on wp-admin/upload.php, satisfying AJAX nonce validation, and (2) the account-id and api-key parameters are sanitized with sanitize_text_field() and filter_input(INPUT_POST), neither of which strips single quotes. Since these values are written directly into single-quoted PHP string literals via define() statements, a single quote breaks the string context and allows arbitrary PHP code injection. The absence of wp_magic_quotes() slashing on filter_input() further removes a layer of escaping.
Business impact
This vulnerability poses significant operational risk to WordPress sites relying on the Cloudflare Images plugin. Any author, editor, or contributor with upload capabilities—a common role for content creators—can silently modify the site's configuration file to execute arbitrary code. Once exploited, an attacker gains the same privileges as the web server process, potentially enabling data theft, malware installation, ransomware deployment, or complete site takeover. Organizations managing multiple WordPress instances or allowing third-party content creators should regard this as a critical priority, as the attack requires only legitimate account credentials at a low privilege level.
Affected systems
The Offload, AI & Optimize with Cloudflare Images plugin in all versions up to and including 1.10.2 is affected. This impacts any WordPress installation with the plugin active and at least one user account at Author level or above. The vulnerability is most acute in multi-user environments, such as agencies, publishing platforms, or content networks where author and editor accounts are common. Sites using older versions of the plugin or those with delayed patching cycles face immediate exposure.
Exploitability
This vulnerability is readily exploitable by any authenticated user with Author-level capabilities or above. No special tools, network reconnaissance, or user interaction is required—only a valid WordPress login and the ability to access wp-admin/upload.php. The attack is deterministic: the nonce and AJAX handler are always present and accessible to eligible users, and the input sanitization failure is consistent across all affected versions. The low complexity and lack of user interaction make this a high-confidence, repeatable attack vector suitable for both targeted and opportunistic exploitation.
Remediation
Update the Cloudflare Images plugin to a patched version that (1) restricts the cf_images_do_setup AJAX handler to the manage_options capability, (2) properly escapes or parameterizes all values written to wp-config.php, and (3) removes or restricts exposure of the cf-images-nonce to administrative users only. Verify the specific patched version number against the official Cloudflare or plugin repository advisory. For immediate interim protection, restrict Author and Editor roles, disable the plugin until patching, or use a Web Application Firewall to filter requests to the vulnerable AJAX endpoint.
Patch guidance
Locate the plugin in wp-admin/plugins.php or via wp-cli, note the current version, and apply the latest update once released by the vendor. Verify the patch resolves both the capability check and input escaping issues before re-enabling the plugin in production. Test the Cloudflare Images setup workflow post-patch to confirm functionality. Document the patch date and version for compliance and incident response records.
Detection guidance
Monitor server logs and Web Application Firewall (WAF) logs for requests to /wp-admin/admin-ajax.php containing the action=cf_images_do_setup parameter, especially from non-administrative source IPs or user agents. Flag POST requests with single-quote characters in the account-id or api-key fields. Review wp-config.php modification timestamps and diffs against version control or file integrity monitoring (FIM) systems; unexpected changes may indicate successful exploitation. Audit WordPress user accounts and login histories to identify suspicious Author+ account creation or compromise. Check web server process logs for execution of unexpected PHP code or system commands immediately following wp-config.php modifications.
Why prioritize this
With a CVSS v3.1 score of 8.8 (HIGH), low attack complexity, low privilege threshold, and widespread applicability to WordPress sites using a popular plugin, this vulnerability merits urgent remediation. The combination of easy exploitability and severe impact (full code execution) elevates it above typical plugin vulnerabilities. Organizations should prioritize patching within 24–48 hours, especially if they have author-level users from untrusted or third-party sources.
Risk score, explained
The CVSS 8.8 score reflects a remote, network-accessible attack vector (AV:N) requiring low attack complexity (AC:L), low privileges (PR:L), and no user interaction (UI:N). The impact is severe: High confidentiality (C:H), integrity (I:H), and availability (A:H), as arbitrary code execution enables data exfiltration, modification, and system disruption. The scope is unchanged (S:U), meaning the attacker does not break out of the intended WordPress sandbox into other systems, but since they can rewrite wp-config.php, they effectively own the entire WordPress instance. This score appropriately reflects the severity and ease of exploitation.
Frequently asked questions
Can I detect if this vulnerability has already been exploited on my site?
Check wp-config.php for unexpected define() statements, unusual PHP code, or suspicious modifications added after the plugin was installed. Use file integrity monitoring (FIM) tools or version control to detect unauthorized changes. Review WordPress and web server logs (typically under wp-content/debug.log and /var/log/apache2 or /var/log/nginx) for POST requests to admin-ajax.php with action=cf_images_do_setup. Look for process execution logs showing PHP spawning shells or system commands. If you suspect compromise, consider engaging a forensic investigator to analyze the timeline and extent of intrusion.
Do I need to remove the plugin entirely, or just update it?
Updating to the patched version is the correct remediation. Removal is unnecessary if a secure version is available from the vendor. However, if patching is delayed or unavailable, disable the plugin temporarily to mitigate exposure. Test the patched version thoroughly in a staging environment before deploying to production to ensure Cloudflare Images functionality is preserved.
What privilege level do I need to be vulnerable to this attack?
You are vulnerable if your WordPress site has any user accounts with Author level or above. Authors can upload files (and thus access wp-admin/upload.php), which exposes the vulnerable AJAX nonce. Contributors and Subscribers are not affected. Limit the number of Author accounts to trusted individuals only.
Is this vulnerability already being exploited in the wild?
The vulnerability has not been added to the CISA Known Exploited Vulnerabilities (KEV) catalog as of the publication date, indicating no public or widespread active exploitation has been reported. However, given the ease of exploitation and the plugin's prevalence, defensive patching should not be delayed based on KEV status alone. Assume that motivated threat actors will probe for this vulnerability once details are public.
This analysis is provided for informational purposes and does not constitute legal or professional security advice. The vulnerability details, affected versions, and patch information are accurate as of the publication date; vendors may release updates or issue corrections that supersede this analysis. Organizations should verify all technical details against official vendor advisories and conduct their own risk assessment. Exploitation of this or any vulnerability without authorization is illegal. SEC.co makes no warranty regarding the completeness or timeliness of this intelligence and recommends consulting with qualified security professionals before taking remediation actions. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2018-25388HIGHHaPe PKH 1.1 Arbitrary File Upload Vulnerability (CVSS 8.8)
- CVE-2018-25409HIGHSIM-PKH 2.4.1 Arbitrary File Upload Leading to Remote Code Execution
- CVE-2019-25758HIGHJoomla! vBizz Unrestricted File Upload to RCE
- CVE-2026-10072HIGHDreamMaker Arbitrary File Upload RCE Vulnerability
- CVE-2026-11344HIGHUnrestricted File Upload in code-projects Vehicle Management System 1.0
- CVE-2026-11419HIGHAltium Enterprise Server Path Traversal – Arbitrary File Write
- CVE-2026-11474HIGHUnrestricted File Upload in Kushan2k Student Management System
- CVE-2026-30761HIGHSourceBans Material Admin Arbitrary File Upload RCE Vulnerability