A user enumeration and email disclosure vulnerability exists in Grav v1.7.49.5 with Admin plugin v1.10.49.1.
The "Forgot Password" functionality at /admin/forgot leaks information about valid usernames and their associated email addresses through distinct server responses.
This allows an attacker to enumerate users and disclose sensitive email addresses, which can be leveraged for targeted attacks such as password spraying, phishing, or social engineering.
The issue resides in the <code>taskForgot()</code> function, which handles the forgot password workflow.
Relevant vulnerable logic:
if (null === $user || $user->state !== 'enabled' || !$to) {
...
// Generic message for invalid/non-existing users
$this->setMessage($this->translate('PLUGIN_ADMIN.FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL'));
return $this->createRedirectResponse($current);
}
if ($rateLimiter->isRateLimited($username)) {
...
$interval = $config->get('plugins.login.max_pw_resets_interval', 2);
// Sensitive message for valid users
$this->setMessage($this->translate('PLUGIN_LOGIN.FORGOT_CANNOT_RESET_IT_IS_BLOCKED', $to, $interval), 'error');
return $this->createRedirectResponse($current);
}
When an attacker submits the password reset form at /admin/forgot with an invalid username, the application responds with:
Instructions to reset your password have been sent to your email address
However, when a valid username is supplied, and the attacker repeatedly triggers password reset requests, the application responds with:
Cannot reset password for <USER_EMAIL>, password reset functionality temporarily blocked, please try later (maximum 60 minutes)
This discrepancy in responses enables:
1. User Enumeration – Attackers can determine if a username exists in the system by analyzing the response.
2. User Email Disclosure – The system discloses the actual email address associated with the account (e.g., admin@localhost.test).
This violates best practices for authentication flows, where responses should remain generic to avoid leaking sensitive information.
https://<target>/admin/forgotinvalid_user): Instructions to reset your password have been sent to your email address
admin). Cannot reset password for admin@localhost.test, password reset functionality temporarily blocked, please try later (maximum 60 minutes)
Modify the <code>taskForgot()</code> logic to always return a generic, non-identifying message, regardless of whether the username exists or rate limits are hit.
Example safe response:
If the account exists, password reset instructions will be sent.
Do not include email addresses ($to) or other sensitive data in error messages.
{
"severity": "MODERATE",
"nvd_published_at": "2025-12-01T22:15:50Z",
"github_reviewed_at": "2025-12-02T00:38:24Z",
"github_reviewed": true,
"cwe_ids": [
"CWE-204"
]
}