WPGraphQL has deprecated user field on SendPasswordResetEmailPayload that leaks user existence + profile (defeats explicit anti-enumeration design)
The sendPasswordResetEmail mutation in WPGraphQL is explicitly designed to prevent user enumeration. The resolver in src/Mutation/SendPasswordResetEmail.php states in a code comment:
// We obsfucate the actual success of this mutation to prevent user enumeration.
The mutation always returns success: true regardless of whether the supplied username/email belongs to an existing user. The intended public output field is only success: Boolean.
However, a deprecated user field is still registered on the SendPasswordResetEmailPayload output type in src/Deprecated.php (lines 433-450). This deprecated field resolves to a full User object when the supplied username/email corresponds to an existing author-class user, and null otherwise — completely undermining the anti-enumeration design.
The @todo remove in 3.0.0 comment acknowledges the field is scheduled for removal, but it remains active in all 2.x releases, including current 2.14.1.
Discovered via source code review on May 29, 2026.
The mutation resolver in src/Mutation/SendPasswordResetEmail.php:
```php
$payload = ['success' => true, 'id' => null];
$user_data = self::get_user_data($input['username']);
if (!$user_data) {
graphql_debug(...);
return $payload; // id stays null
}
// ...send email, then...
return ['id' => $user_data->ID, 'success' => true];
```
The intended public output field is only success. The id is internal-only state for downstream resolvers.
src/Deprecated.php registers an additional user field on the same payload type:
```php
register_graphql_field(
'SendPasswordResetEmailPayload',
'user',
[
'type' => 'User',
'deprecationReason' => static function () { return __('This field will be removed...'); },
'resolve' => static function ($payload, $args, AppContext $context) {
return !empty($payload['id'])
? $context->get_loader('user')->load_deferred($payload['id'])
: null;
},
],
);
```
This field reads the internal $payload['id'] and resolves it through the standard user loader. The User Model's allowed_restricted_fields policy permits unauthenticated reads of public author fields (databaseId, name, firstName, lastName, slug, description, uri, url).
```graphql
mutation EnumerateUser {
sendPasswordResetEmail(input: { username: "[email protected]" }) {
success
user {
databaseId
name
firstName
lastName
slug
description
uri
}
}
}
```
Behavior:
data.sendPasswordResetEmail.user is nulldata.sendPasswordResetEmail.user is a full User object with the listed fields populatedsuccess always returns true, preserving the appearance of obfuscation — the deprecated user field is the leak1. Username/email enumeration: unauthenticated attacker can verify whether any username or email is registered, with no WPGraphQL-side rate limiting
2. 2. Profile disclosure for author-class users: for any user with published posts (including editors and administrators), the attacker obtains databaseId, name, firstName, lastName, slug, description (user bio), uri — substantially more than mere existence
3. 3. Bypasses partial hardening: sites that disabled the REST API user endpoint, the user XML sitemap, and ?author=N author redirects may still be vulnerable through this WPGraphQL path
4. 4. Spearphishing setup: firstName/lastName/description for authors provides personalized phishing material
Either remove the deprecated user field entirely (advance the existing @todo remove in 3.0.0) or change the resolver to always return null:
```diff
'resolve' => static function ($payload, $args, AppContext $context) {
Defense in depth — change the mutation resolver itself to not populate $payload['id'] on real success:
```diff
return [
Luke Granto — independent security researcher operating in good faith. Discovery via source code review of wp-graphql/wp-graphql v2.14.1, approximately 15 minutes from git clone to confirmed bug. No live exploitation against any third-party deployment.
CVE-2026-54768 is classified as CWE-204: Observable Response Discrepancy. The product provides different responses to incoming requests in a way that reveals internal state information to an unauthorized actor outside of the intended control sphere.
CVE-2026-54768 is recorded against 2 packages.
Published on 31 July 2026 and last revised on 3 August 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
github.com
github.com
github.com
unknown has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-204: Observable Response Discrepancy) in other software:
Details
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| unknown | — | — |
| wp-graphql/wp-graphql | — | — |
References
Similar Threats
Free Vulnerability Check
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2026-54768 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.