=== Batch REST Guard ===
Contributors: vladanrs
Donate link: https://365dizajn.com
Tags: security, rest-api, malware, exploit, hacked
Requires at least: 4.1
Tested up to: 7.0
Stable tag: 1.2.5
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Block wp2shell REST batch attacks (CVE-2026-63030). Detect fake admins and backdoor plugins. Extra security for hacked sites.

== Description ==

**Was your site hacked? Did you get a "password changed" email without requesting a reset?** You may be a victim of the **wp2shell** attack — one of the most serious security issues in recent years.

Batch REST Guard is a free security plugin that protects your website from the **wp2shell** exploit chain (**CVE-2026-63030** + **CVE-2026-60137**). Attackers use this vulnerability to break into sites **without a password**, create hidden administrator accounts, install backdoor plugins, and change your admin password — all through the REST API batch endpoint.

= What does this plugin do? =

* **Blocks the attack entry point** — stops unauthenticated requests to `/wp-json/batch/v1` and `?rest_route=/batch/v1` (including POST body bypasses that fool some WAF rules).
* **Keeps your site working** — logged-in users and the block editor (Gutenberg) continue to work normally.
* **Blocks known exploit tools** — rejects requests from automated wp2shell scanners.
* **Alerts you if core is still vulnerable** — reminds you to update to 6.8.6, 6.9.5, 7.0.2 or later.
* **Finds signs of an existing hack** — warns about suspicious admin users (`w2s_*`, `wp2_*`, `wpsvc_*`) and fake plugins (`site-tweaks-…`, `admin-utils-…`, `content-tools-…` and similar random names).

= Who should install this? =

* Site owners affected by the **wp2shell** / **batch REST** vulnerability.
* Anyone who cannot update core immediately and needs a **temporary security fix**.
* Agencies and hosts managing multiple client sites.
* Sites behind Cloudflare or another WAF — use **both**; this plugin blocks attacks inside the application where edge rules may miss POST-body bypasses.

= What is wp2shell? =

Wp2shell is an unauthenticated **remote code execution (RCE)** attack against the WordPress REST API batch endpoint. It was actively exploited in the wild in 2026. Attackers can:

* Create rogue administrator accounts (often named `w2s_…` or `wp2_…`).
* Upload webshell plugins with innocent-looking names.
* Change existing admin passwords (you receive a "password changed" email).
* Take full control of your site without ever logging in.

**Updating core is the complete fix.** This plugin adds an essential extra layer and helps you spot leftover malware after a cleanup.

= Compatible with =

* All hosting environments (shared, VPS, dedicated).
* Cloudflare, Patchstack, Wordfence and other security tools (works alongside them).
* PHP 7.2+ and WordPress 4.1+.
* Multisite and single-site installations.

Developed by [365dizajn](https://365dizajn.com) — web design and hosting security.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/batch-rest-guard/`, or install through **Plugins → Add New → Upload Plugin**.
2. Click **Activate**.
3. Check the Plugins screen — you should see **Core OK — guard active**.
4. If you see red admin warnings, follow the instructions (update core, delete suspicious users/plugins).

No configuration required. Protection starts immediately after activation.

== Frequently Asked Questions ==

= My admin password was changed and I did not request a reset. Can this help? =

Yes. That is a common sign of the wp2shell attack. Install this plugin, update core immediately, delete any unknown admin users, and remove suspicious plugins. The plugin will alert you to known indicators of compromise.

= Do I still need this if core is already updated? =

Yes, as an extra layer. On 6.8.6 / 6.9.5 / 7.0.2 or newer, core is patched. The plugin still blocks anonymous batch requests and can alert you to leftover malicious admin users or fake plugins from a previous attack.

= Will this break the block editor (Gutenberg)? =

No. Logged-in users can still use the batch API. Only unauthenticated (anonymous) requests are blocked.

= I use Cloudflare WAF rules. Is this plugin still needed? =

Yes. Some early WAF rules only checked the URL, but attackers can send `rest_route=/batch/v1` in the POST body. This plugin blocks that inside WordPress regardless of your WAF.

= Does this replace Wordfence or a security plugin? =

No. It complements them. Batch REST Guard focuses specifically on the wp2shell / REST batch attack vector. Keep your main security plugin and keep core updated.

= What suspicious users and plugins does it detect? =

Administrator accounts starting with `w2s_`, `wp2_`, or `wpsvc_`, attacker email domains, and plugin folders matching known fake utility names or random hex suffixes (for example `site-tweaks-ab4378ea9c`).

== Changelog ==

= 1.2.5 =
* Removed Plugin URI header (same as Author URI — WordPress.org submission requirement).

= 1.2.4 =
* Short description trimmed to 150 characters (WordPress.org readme requirement).

= 1.2.3 =
* Expanded plugin description and FAQ for better discoverability and clearer use cases.

= 1.2.2 =
* Renamed plugin to Batch REST Guard (WordPress.org trademark compliance).
* Slug changed to batch-rest-guard.
* Requires at least WordPress 4.1 (wp_json_encode compatibility).
* Plugin Check fixes: error_log phpcs ignore, ZIP paths.

= 1.2.1 =
* Fixed ZIP packaging for Linux servers.

= 1.2.0 =
* First public release (as wp2shell-guard).

== Upgrade Notice ==

= 1.2.3 =
Improved description and FAQ. No code changes — safe to update.

= 1.2.2 =
New plugin slug: batch-rest-guard. Delete the old wp2shell-guard folder before installing.

== Screenshots ==

1. Plugin active on the Plugins screen with core status.
