Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpmyfaq/phpmyfaq
  4. ›
  5. GHSA-985r-q3qp-299h

GHSA-985r-q3qp-299h: phpMyFAQ has an incomplete fix for GHSA-xvp4-phqj-cjr3 — editUser() and updateUserRights() lack authorization guards

June 26, 2026

phpMyFAQ 4.1.3 fixed GHSA-xvp4-phqj-cjr3 (“IDOR Account Takeover”) by adding actor-authorization guards to UserController::overwritePassword(). The patch establishes a new invariant, stated in its own code comments:

“Only SuperAdmins may change other users’ [attributes]. Self-service is always allowed.” and “a non-SuperAdmin must never be able to alter a SuperAdmin or protected account.”

That invariant is not enforced on two sibling endpoints in the same file, which the 4.1.3 fix left unchanged, and which carry the identical “user-controlled userId → getUserById() → privileged mutation” primitive — but with a strictly more dangerous sink:

EndpointRouteSinkGuard in 4.1.3
overwritePassword()admin/api/user/overwrite-passwordchangePassword()isSelf + isSuperAdmin + target-protection (patched)
editUser()admin/api/user/editsetSuperAdmin((bool)$req.is_superadmin)none (only userHasPermission(USER_EDIT))
updateUserRights()admin/api/user/update-rightsgrantUserRight($req.userId, …)none (only userHasPermission(USER_EDIT))

A logged-in administrator holding the delegable edit_user right — but not SuperAdmin — can therefore:

  1. Set their own (or anyone’s) is_superadmin flag to true via admin/api/user/edit → full privilege escalation to SuperAdmin.
  2. Grant arbitrary rights to any account via admin/api/user/update-rights.

This is exactly the threat model the parent advisory (GHSA-xvp4) calls out: “organizations with multiple admin users where not all should have SuperAdmin access.”

References

  • github.com/advisories/GHSA-985r-q3qp-299h
  • github.com/thorsten/phpMyFAQ/security/advisories/GHSA-985r-q3qp-299h

Code Behaviors & Features

Detect and mitigate GHSA-985r-q3qp-299h with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.1.4

Fixed versions

  • 4.1.4

Solution

Upgrade to version 4.1.4 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-832: Unlock of a Resource that is not Locked

Source file

packagist/phpmyfaq/phpmyfaq/GHSA-985r-q3qp-299h.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 16 Jul 2026 00:18:40 +0000.