CVE-2025-8723: CWE-94 Improper Control of Generation of Code ('Code Injection') in mecanik Cloudflare Image Resizing – Optimize & Accelerate Your Images
The Cloudflare Image Resizing plugin for WordPress is vulnerable to Remote Code Execution due to missing authentication and insufficient sanitization within its hook_rest_pre_dispatch() method in all versions up to, and including, 1.5.6. This makes it possible for unauthenticated attackers to inject arbitrary PHP into the codebase, achieving remote code execution.
AI Analysis
Technical Summary
CVE-2025-8723 is a critical vulnerability classified under CWE-94 (Improper Control of Generation of Code) found in the Cloudflare Image Resizing – Optimize & Accelerate Your Images WordPress plugin developed by mecanik. This vulnerability exists in all versions up to and including 1.5.6. The root cause is the lack of authentication and insufficient sanitization in the hook_rest_pre_dispatch() method, which processes REST API requests. Because this method does not properly validate or restrict input, an unauthenticated attacker can inject arbitrary PHP code into the plugin’s execution context. This leads to remote code execution (RCE), allowing the attacker to execute arbitrary commands on the underlying server hosting the WordPress site. The vulnerability is remotely exploitable over the network without any authentication or user interaction, making it highly dangerous. The CVSS v3.1 base score is 9.8, reflecting the ease of exploitation and the severe impact on confidentiality, integrity, and availability. No patches or fixes are currently linked, and no known exploits have been reported in the wild yet. The vulnerability affects a widely used WordPress plugin that integrates Cloudflare’s image resizing capabilities, which is popular among websites aiming to optimize image delivery. This vulnerability could be leveraged to compromise websites, steal sensitive data, deface sites, or use the compromised server as a foothold for further attacks.
Potential Impact
The impact of CVE-2025-8723 is severe and multifaceted. Successful exploitation grants attackers remote code execution privileges on the affected web server, enabling full control over the compromised system. This can lead to unauthorized data access or exfiltration, website defacement, insertion of malicious payloads (such as web shells or malware), and disruption of service. The attacker could pivot to internal networks, escalate privileges, or use the compromised server as a launchpad for further attacks. Organizations relying on this plugin for image optimization face risks to their website integrity, customer data confidentiality, and operational availability. Given the plugin’s integration with Cloudflare services, exploitation could also undermine trust in content delivery and caching mechanisms. The vulnerability’s unauthenticated nature and lack of required user interaction increase the likelihood of widespread exploitation once public exploit code becomes available. This poses a significant threat to businesses, e-commerce platforms, media sites, and any WordPress-based infrastructure using this plugin globally.
Mitigation Recommendations
Immediate mitigation steps include disabling or removing the Cloudflare Image Resizing plugin until a security patch is released. Organizations should monitor REST API traffic for unusual or suspicious requests targeting the hook_rest_pre_dispatch() endpoint, especially those containing unexpected PHP code or payloads. Implementing Web Application Firewall (WAF) rules to block or rate-limit unauthenticated access to the plugin’s REST API endpoints can reduce exposure. Restricting access to the WordPress REST API to trusted IP addresses or authenticated users can also mitigate risk. Regularly updating WordPress core and all plugins is essential once a patch is available. Security teams should conduct thorough audits of web server logs and file systems for signs of compromise or web shells. Employing runtime application self-protection (RASP) or endpoint detection and response (EDR) tools can help detect exploitation attempts. Additionally, organizations should review and harden PHP configurations to limit code execution risks and isolate WordPress environments where possible.
Affected Countries
United States, Germany, United Kingdom, Canada, Australia, France, Netherlands, India, Brazil, Japan, South Korea, Italy
CVE-2025-8723: CWE-94 Improper Control of Generation of Code ('Code Injection') in mecanik Cloudflare Image Resizing – Optimize & Accelerate Your Images
Description
The Cloudflare Image Resizing plugin for WordPress is vulnerable to Remote Code Execution due to missing authentication and insufficient sanitization within its hook_rest_pre_dispatch() method in all versions up to, and including, 1.5.6. This makes it possible for unauthenticated attackers to inject arbitrary PHP into the codebase, achieving remote code execution.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-8723 is a critical vulnerability classified under CWE-94 (Improper Control of Generation of Code) found in the Cloudflare Image Resizing – Optimize & Accelerate Your Images WordPress plugin developed by mecanik. This vulnerability exists in all versions up to and including 1.5.6. The root cause is the lack of authentication and insufficient sanitization in the hook_rest_pre_dispatch() method, which processes REST API requests. Because this method does not properly validate or restrict input, an unauthenticated attacker can inject arbitrary PHP code into the plugin’s execution context. This leads to remote code execution (RCE), allowing the attacker to execute arbitrary commands on the underlying server hosting the WordPress site. The vulnerability is remotely exploitable over the network without any authentication or user interaction, making it highly dangerous. The CVSS v3.1 base score is 9.8, reflecting the ease of exploitation and the severe impact on confidentiality, integrity, and availability. No patches or fixes are currently linked, and no known exploits have been reported in the wild yet. The vulnerability affects a widely used WordPress plugin that integrates Cloudflare’s image resizing capabilities, which is popular among websites aiming to optimize image delivery. This vulnerability could be leveraged to compromise websites, steal sensitive data, deface sites, or use the compromised server as a foothold for further attacks.
Potential Impact
The impact of CVE-2025-8723 is severe and multifaceted. Successful exploitation grants attackers remote code execution privileges on the affected web server, enabling full control over the compromised system. This can lead to unauthorized data access or exfiltration, website defacement, insertion of malicious payloads (such as web shells or malware), and disruption of service. The attacker could pivot to internal networks, escalate privileges, or use the compromised server as a launchpad for further attacks. Organizations relying on this plugin for image optimization face risks to their website integrity, customer data confidentiality, and operational availability. Given the plugin’s integration with Cloudflare services, exploitation could also undermine trust in content delivery and caching mechanisms. The vulnerability’s unauthenticated nature and lack of required user interaction increase the likelihood of widespread exploitation once public exploit code becomes available. This poses a significant threat to businesses, e-commerce platforms, media sites, and any WordPress-based infrastructure using this plugin globally.
Mitigation Recommendations
Immediate mitigation steps include disabling or removing the Cloudflare Image Resizing plugin until a security patch is released. Organizations should monitor REST API traffic for unusual or suspicious requests targeting the hook_rest_pre_dispatch() endpoint, especially those containing unexpected PHP code or payloads. Implementing Web Application Firewall (WAF) rules to block or rate-limit unauthenticated access to the plugin’s REST API endpoints can reduce exposure. Restricting access to the WordPress REST API to trusted IP addresses or authenticated users can also mitigate risk. Regularly updating WordPress core and all plugins is essential once a patch is available. Security teams should conduct thorough audits of web server logs and file systems for signs of compromise or web shells. Employing runtime application self-protection (RASP) or endpoint detection and response (EDR) tools can help detect exploitation attempts. Additionally, organizations should review and harden PHP configurations to limit code execution risks and isolate WordPress environments where possible.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Wordfence
- Date Reserved
- 2025-08-07T20:42:36.986Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68a4289bad5a09ad00f3cafb
Added to database: 8/19/2025, 7:32:43 AM
Last enriched: 2/26/2026, 5:27:36 PM
Last updated: 3/24/2026, 10:30:38 PM
Views: 252
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.