
Secure User REST API, explained
What does this plugin do?
Do you want to stop the public reading your user REST API in WordPress? Have you ever found yourself with a security exploit documented from a cyber security company? When it comes to secure audits, it's better to be paranoid. We have found a common request from our WordPress care plan customers is to fix the "Disclosure of Users Information via Wordpress API" exploit in WordPress. This plugin fixes that issue.
User REST Permissions Plugin for WordPress
Our plugin forces your WordPress website to require authentication before revealing data in the user API.
The code breakdown
See how our REST API plugin fixes this known Authentication issue.
How does it work?
Our code makes sure that the user API in WordPress requires an Authenticated user.
Without this hackers may use this API to look at content publishers and get a list of users. This is then used to run brute force hacking attempts on your WordPress website.
When you install our plugin, this security risk is solved.
Easy to use and saves load time!
Many server admins will try multiple methods to fix this issue.
We also tried most of them but they all fell short or ultimately caused additional problems in the WordPress Admin.
Our code is the best approach because it ensures the block editor and other WordPress features are not impacted by the limiting of the user API.
See it in action
What it does
User REST Permissions Plugin for WordPress
Block guest queries to sensitive user endpoints while keeping standard authenticated REST API workflows intact.
Pass Cybersecurity Penetration Audits
Instantly satisfy audit requirements for corporate clients who mandate blocking of public user enumeration on WordPress endpoints.
The Code Breakdown — Pure Performance
Hooks directly into the rest_authentication_errors filter without executing bulky database queries or external lookups.
Easy to Use and Saves Load Time
Stops automated credential stuffers and bots from wasting PHP processing cycles querying your author listings.
Free Download
Secure User REST API is free. Download it from GitHub and install it like any other plugin.
- The full plugin, free to use
- Use it on as many sites as you like
- Open source under GPLv2 or later
- Read the code and report issues on GitHub
How to install
- 1On GitHub, choose Code → Download ZIP.
- 2In WordPress, go to Plugins → Add New → Upload Plugin.
- 3Upload the ZIP file, then click Activate.
Technical specifications
- Type
- WordPress Plugin
- Category
- Security
- Version
- 1.0.2
- Updated
- 2024-04-04
- WordPress
- 6.8 or higher
- PHP
- 8.0 to 8.5.12
- Tested up to
- WordPress 7.1.4
- Licence
- GPLv2
- Price
- Free
Works with
- WordPress
Frequently Asked Questions
Is this plugin free to use?
Yes, the Plugin is entirely free to use. We believe in providing a straightforward solution without any hidden costs. Simply download the plugin from our GitHub repository, follow the installation steps as your would for any wordpress plugin. On activation your WordPress user endpoints will require authentication.
What WordPress exploit does this fix?
In WordPress 4.7 the WordPress REST API was introduced. This API revealed a whole list of users to the API. It does not reveal emails or other data, but it does show usernames. The exploit is known as "CVE-2017-5487" The official fix is to only show users in this API that are Authors. Although this is an official fix, some penetration testers will say that any used data revealed without authentication is a risk. This plugin will allow that perceived weakness to be resolved by forcing the User API to be authenticated.
Can I use this code in my own plugin?
The code is released as GPL. You can use it with attribution.
Are there any alternatives to using this plugin?
As far as I know the only alternative is a pro plugin license for WordFence. A well known security plugin. If you are unsure of how best to secure your WordPress website, the use of WordFence would be a good start to harden your website.
Can I just turn off the end point for all users even when logged in?
No. The WordPress admin interface and block editor require the API to be readable or return a 401. The user / author selection box inside the Block Editor will disappear when a 401 is returned. If a 404 is returned it creates errors in the block editor.
What does the end point return when it is called?
The rest API for users will return a 401 response - Unauthorised when called directly. If you do not have permission inside the WordPress Admin it will return a 403. It does this automatically because it makes use of the API for the WordPress error object.
Related Articles and Videos

WordPress Security: 9 Tips to Secure Your Website
The WordPress platform is highly flexible, making it an ideal CMS for almost any type of website. This has led to WordPress being quite popular, powering 43% of all websites on the internet. However, this flexibility and popularity also threaten WordPress security, as it attracts hacking attempts. Pre-built themes make WordPress websites more accessible to the everyday…

Securing Your WordPress Administrator Login
Username and password theft are rampant, and hackers are compromising them. Here are tips to secure your WordPress Administrator login.




