Pinny’s REST Lock – Block REST User Enumeration
Blocks public REST API user enumeration while preserving full WordPress functionality. Pinny’s REST Lock is an ultra-lightweight security plugin that locks down WordPress REST API user endpoints without breaking your site . It is designed to fix one of the most common and overlooked WordPress securi
Blocks public REST API user enumeration while preserving full WordPress functionality.
Pinny’s REST Lock is an ultra-lightweight security plugin that locks down WordPress REST API user endpoints without breaking your site .
It is designed to fix one of the most common and overlooked WordPress security issues — public user enumeration via the REST API — using the correct, core-aligned approach.
🚨 Why This Plugin Is Necessary
By default, WordPress publicly exposes REST API endpoints such as:
/wp-json/wp/v2/users
On public sites, these endpoints can be accessed without authentication and are routinely used as the first step in real-world attacks .
This is where attackers start.
Public access to REST user endpoints allows attackers to:
- Enumerate valid usernames
- Identify administrator and privileged accounts
- Eliminate guesswork before brute-force attacks
- Chain enumeration with login abuse and password reset attacks
This is not theoretical. User enumeration is a baseline reconnaissance technique used by bots and human attackers alike.
Blocking public access to REST user endpoints should be considered required security hygiene for every WordPress site .
⚠️ Common REST Protection Pitfalls
Securing REST user endpoints requires precision. Broad or poorly timed restrictions often introduce serious side effects.
Common issues include:
- Blocking all users , including administrators, which breaks authenticated workflows
- Disabling the REST API entirely , causing the block editor, WooCommerce, and modern plugins to fail
- Applying restrictions before authentication , preventing WordPress from distinguishing public and authorized requests
- Allowing low-privilege roles , such as subscribers, to retain access — leaving user enumeration possible
Effective protection must be narrowly scoped, permission-aware, and aligned with WordPress core behavior.