CVE-2026-3352

Easy PHP Settings <= 1.0.4 - Authenticated (Administrator+) PHP Code Injection via 'wp_memory_limit' Setting

2026-03-06 11:26
ZAST.AI

Strategic Overview

Status
Patched in 1.0.5
Affected Plugin
Easy PHP Settings
Affected Version
<= 1.0.4
CVSS
7.2High
Weakness type
CWE-94 · Improper Control of Generation of Code ('Code Injection')
CVE
CVE-2026-3352
View all Easy PHP Settings vulnerabilities

At a glance

CVE-2026-3352 is a high-severity Improper Control of Generation of Code ('Code Injection') vulnerability in the Easy PHP Settings WordPress plugin, affecting versions <= 1.0.4. It carries a CVSS score of 7.2 (reachable over the network; low attack complexity; high confidentiality, integrity, availability impact). Exploitation requires an authenticated account at Administrator level or above. The issue is fixed in version 1.0.5; sites on affected versions should update now. Disclosed March 2026, reported by ZAST.AI.

Vulnerability Overview

The Easy PHP Settings plugin for WordPress is vulnerable to PHP Code Injection in all versions up to, and including, 1.0.4 via the `update_wp_memory_constants()` method. This is due to insufficient input validation on the `wp_memory_limit` and `wp_max_memory_limit` settings before writing them to `wp-config.php`. The `sanitize_text_field()` function used for sanitization does not filter single quotes, allowing an attacker to break out of the string context in a PHP `define()` statement. This makes it possible for authenticated attackers, with Administrator-level access and above, to inject and execute arbitrary PHP code on the server by modifying `wp-config.php`, which is loaded on every page request.

Technical Analysis

The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no interaction from a victim user. A successful exploit has high impact on confidentiality, integrity, availability — full site compromise territory.

CWE-94: Improper Control of Generation of Code ('Code Injection')

Easy PHP Settings <= 1.0.4 carries this weakness at update_wp_memory_constants(), and reaching it takes an account at Administrator level or above. Code injection means input from a request reaches a language construct that evaluates code, so the attacker's text is executed rather than treated as data.

The injected code runs with the web server's privileges, giving the attacker the same access to the database and filesystem as WordPress itself. For Easy PHP Settings the fix is 1.0.5: builds <= 1.0.4 are affected, anything from 1.0.5 onward is not.

Remediation

Update to version 1.0.5, or a newer patched version

How does WordSec protect against this?

An attacker needs Administrator access first, so the firewall sees the attempt as traffic from a logged-in account: WordSec's web application firewall inspects request payloads before WordPress loads them. Classes like this one can leave something behind, so the staged malware scanner is the second half: it looks for dropped files and modified code rather than for the request that created them. None of that substitutes for the fix: Easy PHP Settings 1.0.5 closes this, and updating the plugin is the step that ends it.

  • Firewall
  • Scanner
  • Alerts

External References

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C