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.
The EmailKit WordPress plugin versions up to 1.6.5 contain a path traversal vulnerability in the create_template() method that allows authenticated attackers with Author-level access to read arbitrary files from the server. The vulnerability exploits a flawed validation check where realpath() returns false on non-existent directories, causing the security check to be bypassed in PHP 8.x environments.
ثغرة اجتياز المسار في إضافة EmailKit لـ WordPress تسمح للمهاجمين المصرحين بمستوى المؤلف أو أعلى بقراءة ملفات تعسفية من الخادم. تحدث الثغرة لأن دالة realpath() تعيد false عندما لا يكون المجلد موجوداً، مما يؤدي إلى تجاوز فحص التحقق من الصحة في بيئات PHP 8.x.
The EmailKit WordPress plugin versions up to 1.6.5 contain a path traversal vulnerability in the create_template() method that allows authenticated attackers with Author-level access to read arbitrary files from the server. The vulnerability exploits a flawed validation check where realpath() returns false on non-existent directories, causing the security check to be bypassed in PHP 8.x environments.
Update the EmailKit plugin to version 1.6.6 or later immediately. If immediate patching is not possible, restrict Author-level access to trusted users only, disable the emailkit-editor-template REST API endpoint, and monitor access logs for suspicious file read attempts. Ensure wp-config.php and other sensitive files have proper file system permissions.
قم بتحديث إضافة EmailKit إلى الإصدار 1.6.6 أو أحدث فوراً. إذا لم يكن التحديث ممكناً فوراً، قيّد وصول مستوى المؤلف للمستخدمين الموثوقين فقط، وعطّل نقطة نهاية REST API الخاصة بـ emailkit-editor-template، وراقب سجلات الوصول للمحاولات المريبة. تأكد من أن ملف wp-config.php والملفات الحساسة الأخرى لها أذونات نظام الملفات المناسبة.