EmailKit <= 1.6.5 - Authenticated (Author+) Arbitrary File Read via 'emailkit-editor-template' REST Parameter

6.5
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CVE CVE-2026-5957
CVSS 6.5 (Medium)
Publicly Published May 4, 2026
Last Updated May 5, 2026
Researcher Nguyen Cong Quang

Description

The EmailKit plugin for WordPress is vulnerable to Arbitrary File Read in all versions up to and including 1.6.5. This is due to a flawed path traversal validation in the create_template() method of the CheckForm class, where realpath() is called on the allowed base directory (wp-content/uploads/emailkit/templates/) which may not exist, causing it to return false. In PHP 8.x, strpos($real_path, false) implicitly converts false to an empty string, and strpos() with an empty needle always returns 0, causing the check strpos(...) !== 0 to evaluate to false and bypassing the path validation entirely. This makes it possible for authenticated attackers, with Author-level access and above, to read arbitrary files from the server, including sensitive files such as wp-config.php, by supplying an absolute path to the emailkit-editor-template REST API parameter.

References

Share

Vulnerability Details for EmailKit – Email Customizer for WooCommerce & WP

Software Type Plugin
Software Slug emailkit (view on wordpress.org)
Patched? Yes
Remediation Update to version 1.6.6, or a newer patched version
Affected Version
  • <= 1.6.5
Patched Version
  • 1.6.6

Recent vulnerabilities in EmailKit – Email Customizer for WooCommerce & WP

Did you know Wordfence Intelligence provides free personal and commercial API access to our comprehensive WordPress vulnerability database, along with a free webhook integration to stay on top of the latest vulnerabilities added and updated in the database? Get started today!

Learn more

Want to get notified of the latest vulnerabilities that may affect your WordPress site?
Install Wordfence on your site today to get notified immediately if your site is affected by a vulnerability that has been added to our database.

Get Wordfence

The Wordfence Intelligence WordPress vulnerability database is completely free to access and query via API. Please review the documentation on how to access and consume the vulnerability data via API.

Documentation