Junglewise Threat Intelligence

CVE-2026-9860: vanyukov Cloudflare Images RCE in cf_images_do_setup AJAX handler

CVE-2026-9860 · Severity: high · CVSS 8.8 · Published 2026-06-18

Executive brief

A vulnerability in a popular WordPress plugin used for optimizing and offloading images to Cloudflare allows users with 'Author' level access or higher to take complete control of the website. By exploiting a flaw in how the plugin saves its configuration, an attacker can inject and execute malicious code on the server. This could lead to a total site takeover, theft of sensitive data, or the installation of malware.

Technical details

The vulnerability exists in the cf_images_do_setup AJAX handler, which incorrectly requires only the 'upload_files' capability (Author level) instead of 'manage_options' (Administrator level). The handler fails to properly escape single quotes when processing the 'account-id' or 'api-key' parameters, as sanitize_text_field() does not strip single quotes and filter_input(INPUT_POST) bypasses standard WordPress magic quotes. An authenticated attacker can use a single quote to break out of the PHP string literal in the write_config() define() statement within wp-config.php, leading to arbitrary code execution. The required 'cf-images-nonce' is also exposed to Author-level users via the CFImages JavaScript object on the media upload page, facilitating the attack.

Affected products

  • vanyukov Offload, AI & Optimize with Cloudflare Images <= 1.10.2

Timeline

  • 2026-06-18: advisory: NVD and Wordfence published the vulnerability details.

References