CVE-2025-12182
Executive Summary
CVE-2025-12182 is a Missing Authorization vulnerability in the Qi Blocks WordPress plugin (versions up to and including 1.4.3). The plugin fails to perform a capability check in the resize_image_callback() function, allowing authenticated attackers with Contributor-level access or higher to resize arbitrary media library images belonging to other users. This can lead to unintended file writes, disk consumption, and server resource abuse through processing of large images. The vulnerability has a CVSS score of 4.3 (Medium) and currently has no known public exploit or patch.
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 Qi Blocks WordPress plugin. It does not affect Apache, Nginx, or any other web server software. The issue lies entirely within the plugin's authorization logic.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
- Base Score: 4.3 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor+)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low (unintended file writes)
- Availability Impact: Low (disk consumption, resource abuse)
Threat Level: Medium. While the impact is limited to integrity and availability, the low attack complexity and low privileges required make it a viable target for authenticated attackers.
Deep Dive & Mechanics
The vulnerability resides in the resize_image_callback() function, which is intended to resize images in the WordPress media library. The function is registered via AJAX for authenticated users but lacks a capability check to verify that the requesting user has permission to resize a specific attachment. WordPress's current_user_can() function is not called with the appropriate capability (e.g., edit_post for the attachment).
Attack Flow:
- An authenticated attacker with Contributor-level access logs in.
- The attacker crafts an AJAX request to the
resize_image_callback()function, specifying an attachment ID belonging to another user. - The plugin processes the request without verifying ownership or edit permissions.
- The attacker can resize the image, potentially overwriting the original file or creating multiple resized versions, leading to disk consumption and server resource abuse.
Root Cause: Missing capability check in the AJAX handler. The function does not call current_user_can( 'edit_post', $attachment_id ) before processing.
Vulnerable vs. Patched Code
Vulnerable Code (qi-blocks/includes/class-qi-blocks-image-resize.php):
public function resize_image_callback() {
$attachment_id = intval( $_POST['attachment_id'] );
$width = intval( $_POST['width'] );
$height = intval( $_POST['height'] );
// Missing capability check
$image = wp_get_image_editor( get_attached_file( $attachment_id ) );
if ( ! is_wp_error( $image ) ) {
$image->resize( $width, $height, true );
$image->save( get_attached_file( $attachment_id ) );
}
wp_die();
}
Patched Code (Hypothetical fix):
public function resize_image_callback() {
$attachment_id = intval( $_POST['attachment_id'] );
// Add capability check
if ( ! current_user_can( 'edit_post', $attachment_id ) ) {
wp_die( 'Unauthorized', 403 );
}
$width = intval( $_POST['width'] );
$height = intval( $_POST['height'] );
$image = wp_get_image_editor( get_attached_file( $attachment_id ) );
if ( ! is_wp_error( $image ) ) {
$image->resize( $width, $height, true );
$image->save( get_attached_file( $attachment_id ) );
}
wp_die();
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with Qi Blocks plugin <= 1.4.3
- Authenticated user with Contributor role or higher
Exploitation Steps:
- Log in as a Contributor.
- Obtain the attachment ID of a target image (e.g., from another user's post).
- Send a crafted AJAX request:
curl -X POST \
-d "action=qi_blocks_resize_image&attachment_id=123&width=100&height=100" \
-b "wordpress_logged_in_cookie=..." \
http://target.com/wp-admin/admin-ajax.php
- The server will resize the image, potentially overwriting the original or creating multiple copies.
Note: No public exploit code is available. The above is a conceptual demonstration.
Blue Team (Detection & Defense)
Detection:
- Monitor AJAX requests to
admin-ajax.phpwith actionqi_blocks_resize_image. - Look for rapid, repeated resize requests from the same user.
- Check for unusual disk I/O or image processing activity.
Defense:
- Implement a Web Application Firewall (WAF) rule to block requests to
admin-ajax.phpwith actionqi_blocks_resize_imagefrom non-admin users. - Disable the plugin until a patch is available.
- Restrict Contributor roles from accessing media uploads via custom capabilities.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/wp-admin/admin-ajax.phpwith parameteraction=qi_blocks_resize_image - File System: Unexpected resized images in
/wp-content/uploads/with modified timestamps - Logs: WordPress debug logs showing
wp_get_image_editorcalls for attachments not owned by the requesting user - Disk: Sudden increase in disk usage due to multiple resized copies of images
Detection Engineering
YARA Rule
rule Detect_Qi_Blocks_Resize_Exploit {
meta:
description = "Detects exploitation attempts of CVE-2025-12182 in Qi Blocks plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-12182"
strings:
$ajax_action = "qi_blocks_resize_image"
$attachment_id = "attachment_id"
$width = "width"
$height = "height"
condition:
all of them
}
Sigma Rule
title: Qi Blocks Unauthorized Image Resize Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit CVE-2025-12182 by resizing arbitrary images
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'action=qi_blocks_resize_image'
condition: selection
falsepositives:
- Legitimate admin resizing their own images
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-12182 - Qi Blocks Unauthorized Image Resize Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=qi_blocks_resize_image"; http_client_body;
classtype:attempted-recon;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the Qi Blocks plugin until a patched version is released.
- Restrict Contributor roles from accessing media functionality via custom user role plugins.
- Monitor logs for unauthorized resize attempts.
Long-term Fix:
- Apply the patch from the plugin vendor when available.
- Implement a capability check in the
resize_image_callback()function usingcurrent_user_can( 'edit_post', $attachment_id ).
Workaround:
- Add a custom filter to block the AJAX action for non-admin users:
add_action( 'wp_ajax_qi_blocks_resize_image', function() {
if ( ! current_user_can( 'administrator' ) ) {
wp_die( 'Unauthorized', 403 );
}
}, 0 );
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.