CVE-2024-1089
Executive Summary
CVE-2024-1089 is a medium-severity vulnerability affecting the ImageRecycle pdf & image compression plugin for WordPress, up to and including version 3.1.13. The flaw resides in the optimizeAllOn function, which lacks a proper capability check, allowing authenticated attackers with subscriber-level access or higher to modify image optimization settings without authorization. This unauthorized modification of data can lead to misconfiguration of the compression service, potentially causing denial of service or resource exhaustion. The vulnerability is classified under CWE-862 (Missing Authorization) and has a CVSS score of 4.3 (Medium). No public proof-of-concept (PoC) or exploit code is currently available, and the patch status remains unknown.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. The optimizeAllOn function is an AJAX handler that should be restricted to administrators but is accessible to any authenticated user due to a missing current_user_can() check. Attackers with subscriber-level accounts can exploit this to toggle compression settings, potentially disrupting site performance or causing excessive server load.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely over HTTP.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Requires subscriber-level authentication.
- User Interaction (UI): None (N) – No user action needed.
- Scope (S): Unchanged (U) – Exploit does not affect other components.
- Confidentiality Impact (C): None (N) – No data disclosure.
- Integrity Impact (I): Low (L) – Settings can be modified.
- Availability Impact (A): None (N) – No direct denial of service.
Threat Level: Medium. While the impact is limited to integrity, the low privileges required and network exploitability make it a viable target for attackers with minimal access.
Deep Dive & Mechanics
The ImageRecycle plugin registers an AJAX action optimizeAllOn in its class-imagerecycle-admin.php file. The function is intended to enable or disable automatic optimization for all images. However, it does not verify that the requesting user has administrative capabilities. The code likely resembles:
add_action('wp_ajax_optimizeAllOn', 'optimizeAllOn');
function optimizeAllOn() {
// Missing capability check
update_option('imagerecycle_auto_optimize', $_POST['status']);
wp_die();
}
An attacker with subscriber access can send a POST request to /wp-admin/admin-ajax.php with action=optimizeAllOn and status=1 to enable optimization, or status=0 to disable it. This can lead to:
- Disabling compression, causing large images to be served uncompressed.
- Enabling compression on all images, potentially overloading the server if the ImageRecycle API is called excessively.
Vulnerable vs. Patched Code
Vulnerable Code (<= 3.1.13):
add_action('wp_ajax_optimizeAllOn', 'optimizeAllOn');
function optimizeAllOn() {
$status = sanitize_text_field($_POST['status']);
update_option('imagerecycle_auto_optimize', $status);
wp_die();
}
Patched Code (Hypothetical):
add_action('wp_ajax_optimizeAllOn', 'optimizeAllOn');
function optimizeAllOn() {
if (!current_user_can('manage_options')) {
wp_die('Unauthorized', 403);
}
$status = sanitize_text_field($_POST['status']);
update_option('imagerecycle_auto_optimize', $status);
wp_die();
}
The patch adds a capability check using current_user_can('manage_options') to restrict access to administrators only.
Exploitation & Lab Setup
Red Team (Attack Simulation)
- Prerequisites: A WordPress site with ImageRecycle plugin <= 3.1.13 and a subscriber-level account.
- Exploit Steps:
- Log in as a subscriber.
- Send a crafted POST request to disable optimization:
curl -X POST 'http://target/wp-admin/admin-ajax.php' \ -d 'action=optimizeAllOn&status=0' \ --cookie 'wordpress_logged_in_xxx=...' - Verify by checking if images are no longer compressed.
- Impact: Disabling compression can degrade performance; enabling it may cause excessive API calls.
Blue Team (Detection & Defense)
- Monitor AJAX Requests: Look for
action=optimizeAllOnfrom non-admin users. - Audit User Roles: Ensure only administrators have subscriber accounts.
- Web Application Firewall (WAF): Block requests to
admin-ajax.phpwithaction=optimizeAllOnfrom users without admin role. - Log Analysis: Check WordPress logs for unauthorized AJAX calls.
Indicators of Compromise (IOCs)
- Network: POST requests to
/wp-admin/admin-ajax.phpwith bodyaction=optimizeAllOn&status=0orstatus=1from non-admin IPs. - Host: Changes to the
imagerecycle_auto_optimizeoption in the WordPress database. - Logs: WordPress debug log entries showing
wp_ajax_optimizeAllOntriggered by subscriber users.
Detection Engineering
YARA Rule
rule CVE_2024_1089_ImageRecycle {
meta:
description = "Detects vulnerable ImageRecycle plugin code missing capability check"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-1089"
strings:
$func = "optimizeAllOn" nocase
$ajax = "wp_ajax_optimizeAllOn" nocase
$missing_check = "current_user_can" nocase
condition:
$func and $ajax and not $missing_check
}
Sigma Rule
title: CVE-2024-1089 - ImageRecycle Unauthorized Settings Modification
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects unauthorized AJAX requests to modify ImageRecycle optimization settings
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: POST
cs-uri-query|contains: "action=optimizeAllOn"
cs-uri-query|contains: "admin-ajax.php"
condition: selection
falsepositives:
- Legitimate admin actions
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-1089 - ImageRecycle Unauthorized AJAX Request"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=optimizeAllOn"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the ImageRecycle plugin until a patch is available.
- Workaround: Implement a custom capability check via a WordPress plugin or mu-plugin:
add_action('wp_ajax_optimizeAllOn', function() { if (!current_user_can('manage_options')) { wp_die('Unauthorized', 403); } }, 0); - Long-term: Monitor the vendor for an official patch and update to the latest version.
- Hardening: Restrict subscriber accounts and use role-based access controls.
Report generated by Valters IT DevSecOps & CTI Division
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.