Unauthorized User Field Exposure in WordPress REST API

wordpress Updated 02 Oct 2025

Summary

16/10/2023
N/A
Yes i
Medium
5.3

CVE-2023-5561: WordPress does not properly restrict which user fields are searchable via the REST API, allowing unauthenticated attackers to discern the email addresses of users who have published public posts on an affected website vi... Affects wordpress across 3 version ranges.

< 5.7.11+dfsg1-0+deb11u1 >= 14247ee4302378d292863865c643abe99bbfe3c7, < 03505cd7f9898a337013d638fffb15fb6237ac99 >= efa83f48bd4ebd066e5efc94b9feefe50e7925a2, < 44f6b667c73c73f311ccf30559bc31323f929882

Fixed in 5.7.11+dfsg1-0+deb11u1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

WordPress is a widely-used content management system (CMS) that allows users to create and manage websites easily. It features a REST API that enables developers to interact with WordPress programmatically. However, a recent vulnerability has been identified that affects the way user fields are handled through this API, potentially exposing sensitive information.

Vulnerability Detail

The vulnerability, identified as CVE-2023-5561, arises from improper restrictions in the WordPress REST API, which allows unauthenticated attackers to search for user fields that should remain private. This flaw can lead to an Oracle-style attack, where attackers can discern the email addresses of users who have published public posts on affected websites. The implications of this vulnerability are significant, as it compromises user privacy and can facilitate further attacks.

How To Fix

Minimum fixed version

5.7.11+dfsg1-0+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade wordpress

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, site administrators can restrict access to the REST API for unauthenticated users by implementing custom code in their theme's functions.php file. For example, add the following code snippet:

function restrict_rest_api_access() {
    if (!is_user_logged_in()) {
        remove_action('rest_api_init', 'rest_api_init');
    }
}
add_action('init', 'restrict_rest_api_access');

Conclusion

CVE-2023-5561 is a critical vulnerability in WordPress that exposes user email addresses through the REST API. It is essential for site administrators to update their installations to the latest versions to protect user privacy and prevent potential attacks. Implementing the suggested workaround can provide temporary relief until the update is applied.

See every vulnerability recorded for wordpress →

Share this vulnerability

FAQ

CVE-2023-5561 is a vulnerability in WordPress that allows unauthenticated attackers to access user email addresses through the REST API.

If your WordPress version is prior to the fixed versions mentioned, your site may be vulnerable. You can check your version in the WordPress admin dashboard.

The primary risk is the exposure of user email addresses, which can lead to spam, phishing attacks, or further exploitation of user accounts.

It is recommended to update your WordPress installation as soon as new updates are released to ensure you have the latest security patches.

Yes, Vulert can monitor your application for open-source vulnerabilities like CVE-2023-5561 using a manifest file such as package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for wordpress.

How To Fix

Minimum fixed version

5.7.11+dfsg1-0+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade wordpress

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback