آسیبپذیری امنیتی در افزونه WP Popular Posts
The WP Popular Posts plugin for WordPress is vulnerable to Sensitive Information Exposure in all versions up to, and including, 7.4.2 via the 'context' parameter. This makes it possible for unauthenticated attackers to extract sensitive edit-context fields — including raw title, raw content body, password, meta, status, and guid — from non-public post objects such as wp_block synced patterns that WordPress core itself refuses to expose to unauthenticated callers. This is possible because the plugin's REST route is registered with a permission_callback of __return_true and passes the caller-supplied context parameter (e.g., context=edit) directly to WP_REST_Posts_Controller::prepare_item_for_response() without invoking get_item_permissions_check() or check_read_permission(), while the underlying query accepts an arbitrary post_type value without enforcing public or show_in_rest visibility flags.
نسخههای تحت تأثیر
<= 7.4.2
راهنمای اقدام و رفع مشکل (Remediation)
- ۱. پشتیبانگیری: قبل از اعمال هرگونه تغییر، یک بکاپ کامل از پایگاه داده و فایلهای سایت تهیه کنید.
- ۲. بهروزرسانی سریع: افزونه یا هسته wordpress-popular-posts را بلافاصله به آخرین نسخه ارائهشده ارتقا دهید.
- ۳. فایروال و مانیتورینگ: در صورت عدم امکان آپدیت فوری، رولهای امنیتی WAF را فعال کرده و لاگهای وبسرور را پایش نمایید.
مراجع رسمی و مستندات
- https://plugins.trac.wordpress.org/browser/wordpress-popular-posts/tags/7.4.2/src/Query.php#L421 ↗
- https://plugins.trac.wordpress.org/browser/wordpress-popular-posts/tags/7.4.2/src/Rest/PostsEndpoint.php#L38 ↗
- https://plugins.trac.wordpress.org/browser/wordpress-popular-posts/tags/7.4.2/src/Rest/PostsEndpoint.php#L51 ↗
- https://plugins.trac.wordpress.org/browser/wordpress-popular-posts/tags/7.4.2/src/Rest/PostsEndpoint.php#L96 ↗
- https://plugins.trac.wordpress.org/changeset/3715724/wordpress-popular-posts/trunk ↗
- https://plugins.trac.wordpress.org/changeset/3715724/wordpress-popular-posts/trunk/src/Rest/PostsEndpoint.php ↗
- https://www.wordfence.com/threat-intel/vulnerabilities/id/09c63c2f-d2d3-4c39-8329-0e0e5b62db98?source=cve ↗