Skip to content

Secure User REST API

Stop logged-out visitors listing your WordPress users through the REST API.

For agencies and site owners fixing a user-disclosure finding from a security audit.

Overview

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.

Video

See it in action

Key Capabilities

What it does

1

User REST Permissions Plugin for WordPress

Block guest queries to sensitive user endpoints while keeping standard authenticated REST API workflows intact.

2

Pass Cybersecurity Penetration Audits

Instantly satisfy audit requirements for corporate clients who mandate blocking of public user enumeration on WordPress endpoints.

3

The Code Breakdown — Pure Performance

Hooks directly into the rest_authentication_errors filter without executing bulky database queries or external lookups.

4

Easy to Use and Saves Load Time

Stops automated credential stuffers and bots from wasting PHP processing cycles querying your author listings.

Free & Open Source

Free Download

Secure User REST API is free. Download it from GitHub and install it like any other plugin.

Free forever
$0No licence key. No account.
  • 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
Download from GitHub(opens Secure User REST API on GitHub in a new tab)

How to install

  1. 1On GitHub, choose Code → Download ZIP.
  2. 2In WordPress, go to Plugins → Add New → Upload Plugin.
  3. 3Upload the ZIP file, then click Activate.
Details

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
Got Questions?

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.

Guides

Related Articles and Videos

WordPress Security: 9 Tips to Secure Your Website
WordPress & AI
6 min read
Sep 2022

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…

Read Full Article
Securing Your WordPress Administrator Login
WordPress & AI
9 min read
Feb 2022

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.

Read Full Article
More Tools & Plugins

Related Products

View all products
Freemius Pricing Blocks
WordPress Block

Freemius Pricing Blocks

Make pricing tables fast for your Freemius Products

FreeView Product
A simple Headless Helper for WordPress
Headless & Deployment

Headless WordPress Plugin

Run WordPress as a private CMS and rebuild your static site on Cloudflare Pages every time you publish.

FreeView Product
Action Scheduler Cleaner
Performance & Database

Action Scheduler Cleaner

Do unnecessary scheduled actions slow down your WordPress site?

From $9.50 / yrView Product