Cloudanix VulnDB

CVE-2023-6623

Critical · 9.8

CVSS

9.8

EPSS

50.7%

Published

Jan 15, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Attend

A vulnerable website plugin can let anyone on the internet read sensitive server files and potentially take over the site if it is not updated.

Weaponized
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Essential Blocks for WordPress versions before 4.4.3 allow unauthenticated users to overwrite local variables during template rendering through the plugin’s REST API. By manipulating request parameters that influence template selection or path resolution, an attacker may cause the application to include local files outside the intended template directory. This is a Local File Inclusion issue that can expose sensitive files such as WordPress configuration, server files, logs, or application source. Depending on server configuration and available writable/includeable files, LFI may also be chained with techniques such as log poisoning or uploaded file inclusion to achieve code execution.

Why it matters to the business

A vulnerable public WordPress site can be attacked remotely without credentials or user interaction. Successful exploitation may expose database credentials, authentication keys, source code, and other sensitive files, which can lead to full site compromise, data theft, defacement, malware injection, or service disruption. The risk is elevated because exploitation is considered weaponized and the EPSS probability is high, indicating meaningful likelihood of real-world exploitation even though this issue is not currently listed in CISA KEV.

How an attack unfolds

An attacker first identifies a WordPress site using the Essential Blocks plugin and determines whether the installed version is older than 4.4.3. The attacker then sends crafted unauthenticated requests to the plugin’s REST API rendering functionality with parameters designed to overwrite internal variables used during template rendering. By supplying traversal sequences, absolute paths, or stream-wrapper style values, the attacker attempts to force the plugin to include files outside the allowed template location. If successful, the response may contain the contents of local files such as wp-config.php, system files, application logs, or plugin source files. The attacker can use disclosed credentials and secrets to access the database, create persistence, take over WordPress administration, or attempt further exploitation such as log poisoning followed by inclusion of the poisoned log to execute code.

How to fix it

Upgrade Essential Blocks to version 4.4.3 or later immediately. If an upgrade cannot be completed, disable and remove the Essential Blocks plugin until it can be updated safely. Restrict access to WordPress REST API endpoints where feasible using a WAF, reverse proxy, or security plugin, but treat this only as a temporary mitigation. Block requests containing path traversal sequences, encoded traversal, absolute local paths, and PHP stream wrappers in parameters sent to plugin rendering endpoints. Ensure sensitive files such as wp-config.php are not web-readable beyond what WordPress requires, harden file permissions, disable direct PHP execution in upload directories, rotate exposed database credentials and WordPress salts if exploitation is suspected, and review the site for unauthorized admin users, modified plugins/themes, and webshells.

How to confirm the fix worked

Confirm the installed Essential Blocks plugin version is 4.4.3 or later using the WordPress admin plugin page, WP-CLI, file metadata, or software inventory. With WP-CLI, validate using commands such as `wp plugin list | grep essential-blocks`. Verify that unauthenticated requests to Essential Blocks REST API rendering functionality no longer allow caller-controlled template paths or variable overwrite behavior and return a rejection or sanitized response when traversal values are supplied. Review external attack surface scans to ensure no vulnerable plugin versions remain. After patching, test that the site still renders Essential Blocks content correctly and monitor for continued blocked attempts targeting the plugin.

Typical attack path

  1. Scan public WordPress sites for the Essential Blocks plugin or plugin assets under /wp-content/plugins/essential-blocks/.
  2. Fingerprint the plugin version through static assets, readme files, metadata, or behavior of REST API endpoints.
  3. Send unauthenticated crafted requests to Essential Blocks REST API rendering endpoints with variable-overwrite parameters.
  4. Use path traversal, absolute file paths, or PHP stream wrappers to attempt Local File Inclusion.
  5. Read sensitive files such as wp-config.php, web server logs, application source files, or operating system files.
  6. Use exposed credentials, salts, keys, or internal details to escalate access to the WordPress site, database, hosting account, or administrative interfaces.
  7. Optionally chain LFI with log poisoning, file upload, or other weaknesses to obtain remote code execution and persistence.

How to detect it

Review HTTP access logs, WAF/CDN logs, reverse proxy logs, WordPress debug logs if enabled, and endpoint telemetry from the web server. Focus on unauthenticated requests to WordPress REST API paths associated with Essential Blocks, especially requests containing traversal sequences, URL-encoded traversal, absolute filesystem paths, PHP stream wrappers, or target file names such as wp-config.php and /etc/passwd. Look for HTTP 200 responses with unusual response sizes, repeated 400/500 errors during probing, requests from scanning infrastructure, and bursts of requests attempting many file paths. Examine web server and PHP-FPM logs for warnings about failed includes, file-not-found errors, open_basedir restrictions, or unexpected local file reads. If exploitation may have succeeded, perform incident response checks for credential exposure, database access from unusual sources, creation of new WordPress admin users, modified theme/plugin PHP files, unexpected files in wp-content/uploads, and webshell execution. Because LFI exploitation may only appear as crafted HTTP requests, absence of malware artifacts does not rule out data disclosure.

  • /wp-content/plugins/essential-blocks/
  • /wp-json/
  • essential-blocks
  • ../
  • ..%2f
  • %2e%2e%2f
  • ..%252f
  • %252e%252e%252f
  • php://filter
  • php%3a%2f%2ffilter
  • php://input
  • data://
  • expect://
  • file://
  • /etc/passwd
  • /proc/self/environ
  • /var/log/apache2/access.log
  • /var/log/nginx/access.log
  • wp-config.php
  • /wp-config.php
  • error_log
  • open_basedir restriction in effect
  • failed to open stream
  • Failed opening required
  • Failed opening for inclusion

What your security team should do

  • Prioritize patching all WordPress installations using Essential Blocks to version 4.4.3 or later because exploitation is weaponized and the EPSS score indicates elevated real-world likelihood.
  • If immediate patching is not possible, disable the plugin or place compensating WAF rules in front of the site to block suspicious REST API rendering requests.
  • Search historical web, WAF, CDN, and application logs for unauthenticated requests to Essential Blocks REST endpoints containing traversal strings, encoded traversal, PHP stream wrappers, or sensitive file names.
  • If suspicious activity is found, assume credentials or secrets may have been exposed and rotate WordPress salts, database passwords, API keys, and hosting credentials associated with the site.
  • Inspect WordPress for unauthorized administrator accounts, modified plugin/theme files, unexpected PHP files, scheduled tasks, injected JavaScript, and recently changed files under wp-content.
  • Add SIEM detections for requests combining `/wp-json/`, `essential-blocks`, and LFI indicators such as `../`, `%2e%2e%2f`, `php://filter`, `wp-config.php`, or `/etc/passwd`.
  • Ensure routine vulnerability management covers WordPress plugins, not only WordPress core, and remove unused plugins from production sites.

The record

The Essential Blocks WordPress plugin before 4.4.3 does not prevent unauthenticated attackers from overwriting local variables when rendering templates over the REST API, which may lead to Local File Inclusion attacks.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities