CVE-2026-3352
Received Received - Intake
PHP Code Injection in Easy PHP Settings Plugin Allows Remote Execution

Publication date: 2026-03-07

Last updated on: 2026-03-07

Assigner: Wordfence

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-07
Last Modified
2026-03-07
Generated
2026-05-07
AI Q&A
2026-03-07
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 3 associated CPEs
Vendor Product Version / Range
h_m_shahadul_islam easy_php_settings to 1.0.4 (inc)
h_m_shahadul_islam easy_php_settings 1.0.5
h_m_shahadul_islam easy_php_settings 1.1.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

The Easy PHP Settings plugin for WordPress, up to version 1.0.4, is vulnerable to PHP Code Injection via the update_wp_memory_constants() method.

This vulnerability arises because the plugin does not properly validate the wp_memory_limit and wp_max_memory_limit settings before writing them to the wp-config.php file.

The sanitization function used, sanitize_text_field(), does not filter out single quotes, which allows an attacker with Administrator-level access to break out of the string context in a PHP define() statement.

As a result, an authenticated attacker can inject and execute arbitrary PHP code on the server by modifying the wp-config.php file, which is loaded on every page request.


How can this vulnerability impact me? :

This vulnerability allows an attacker with Administrator-level access to execute arbitrary PHP code on the server.

Such code execution can lead to full compromise of the WordPress site and potentially the underlying server.

The attacker can modify the wp-config.php file, which is loaded on every page request, enabling persistent malicious code execution.

This can result in data theft, site defacement, unauthorized access, or use of the server for malicious activities.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': 'This vulnerability involves PHP code injection via the Easy PHP Settings WordPress plugin versions up to 1.0.4, specifically through the `update_wp_memory_constants()` method that improperly sanitizes `wp_memory_limit` and `wp_max_memory_limit` settings.'}, {'type': 'paragraph', 'content': 'Detection on your system can focus on checking if the vulnerable plugin version (<= 1.0.4) is installed and active on your WordPress site.'}, {'type': 'paragraph', 'content': 'You can also inspect the `wp-config.php` file for unexpected or suspicious PHP code injections, especially around the definitions of memory limits.'}, {'type': 'list_item', 'content': "Check the plugin version installed: Use WP-CLI command `wp plugin list` to verify if 'easy-php-settings' plugin is installed and its version."}, {'type': 'list_item', 'content': 'Search for suspicious code in wp-config.php: Use command `grep -i \'wp_memory_limit\' wp-config.php` or `grep -P "define\\s*\\(\\s*\'WP_MEMORY_LIMIT\'" wp-config.php` to look for injected PHP code or anomalies.'}, {'type': 'list_item', 'content': 'Audit recent changes to wp-config.php: Use `stat wp-config.php` to check modification times and `diff` with a known good backup to detect unauthorized changes.'}, {'type': 'list_item', 'content': 'Review WordPress admin users with Administrator-level access for suspicious activity, since exploitation requires authenticated admin privileges.'}] [1]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include:

  • Update the Easy PHP Settings plugin to version 1.0.5 or later, where this vulnerability has been fixed.
  • Restrict Administrator-level access to trusted users only, as exploitation requires authenticated admin privileges.
  • Manually review and clean the `wp-config.php` file to remove any injected malicious PHP code.
  • Implement monitoring and alerting for changes to critical files like `wp-config.php`.
  • Consider temporarily disabling the Easy PHP Settings plugin until the update can be applied.
  • Ensure your WordPress installation and all plugins are kept up to date to reduce exposure to known vulnerabilities.

Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart