Skip to content

REST API leaks usernames via /wp-json/wp/v2/users

By default anyone can pull your usernames via the REST API. That's ammo for brute-force.

Try this first

  1. 1Install a security plugin that blocks the REST users endpoint for non-logged-in users
  2. 2Or add a filter on 'rest_authentication_errors' in functions.php
  3. 3Test in incognito: /wp-json/wp/v2/users should return 401 or 403
  4. 4Leave other endpoints open for plugins that need them

When to bring us in

Blocking REST entirely breaks Gutenberg and many plugins, only cover the users endpoint.

See also

None of the above fits?

Describe your situation below. We pass your input plus the steps you already saw to our AI and return tailored next-step advice. If it's too risky to DIY, we'll say so.

Who are you?

For the AI question we need your email and company, so we can follow up if the AI gets stuck, and to prevent abuse.

Limited to 2 questions per hour and 5 per day, kept lean so the AI stays useful. For more, contacting us directly works better for you and us.

Or skip the DIY entirely

Our Managed IT clients do not look these things up. One point of contact, a fixed monthly price, resolved within working hours.