CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-985R-Q3QP-299H

GHSA-985R-Q3QP-299H: Incomplete Fix in phpMyFAQ Admin API Enables Privilege Escalation and Account Takeover

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 26, 2026·6 min read·9 visits

Executive Summary (TL;DR)

An incomplete security patch in phpMyFAQ allows low-privilege administrative accounts to bypass authorization controls. By submitting crafted requests to vulnerable API endpoints, attackers can modify SuperAdmin account profiles or elevate their own privileges, resulting in full application takeover.

An incomplete mitigation of a predecessor vulnerability (GHSA-xvp4-phqj-cjr3 / CVE-2026-35671) in phpMyFAQ leaves sister administrative API endpoints vulnerable to Insecure Direct Object Reference (IDOR). Specifically, the `editUser` and `updateUserRights` endpoints lack object-level access controls, permitting authenticated low-privilege administrators to escalate their privileges or hijack SuperAdmin accounts.

Vulnerability Overview

The phpMyFAQ platform manages user accounts and privileges through RESTful endpoints under /admin/api/user/. When processing administrative requests, the application relies on an authorization hierarchy to distinguish between general administrators and SuperAdmin accounts. A previous security advisory (GHSA-xvp4-phqj-cjr3) identified that standard administrative users could reset any password via the overwritePassword endpoint, bypassing authorization controls.

While the vendor successfully resolved the direct password modification vector in overwritePassword, the architectural pattern governing other endpoints in the same controller remained unchanged. The endpoints editUser and updateUserRights remain exposed to an Insecure Direct Object Reference (IDOR) flaw, classified under CWE-639. This vulnerability represents a regression by omission, leaving critical profile-management routes without proper access restrictions.

An attacker with active credentials for a low-privilege administrative role can exploit these endpoints. The administrative panel only verifies that the actor has permission to load the administration dashboard. It fails to restrict the scope of modifications, allowing the modification of parameters belonging to higher-privileged users.

Root Cause Analysis

The primary defect lies in src/phpMyFAQ/Controller/Administration/Api/UserController.php. Both the editUser() and updateUserRights() methods validate the initiating session's permission status using a global access-control function. This check is represented by $this->userHasUserPermission(), which verifies whether the active user possesses general rights to edit user accounts in the system.

This system lacks granular, object-level checks. Once the global authorization check completes successfully, the application receives a client-controlled variable, userId, from the raw request payload. The system queries this identifier directly in the database and executes modifications without verifying whether the initiating user possesses authority over the target user.

Consequently, the application treats any request matching the general privilege schema as authorized, regardless of the relative privilege level of the targets. A standard administrator can thus submit requests targeting the SuperAdmin account (userId = 1). This allows the modification of critical parameters, such as group permissions and registered email addresses, which compromises the integrity of the privilege boundary.

Code Analysis

The unpatched implementation of the editUser endpoint in UserController.php processes incoming JSON data directly without validating the hierarchy of the target account relative to the actor.

// UNPATCHED CODE PATH
public function editUser(Request $request): JsonResponse
{
    // Generic permission check (actor is a basic admin)
    $this->userHasUserPermission();
 
    $data = json_decode($request->getContent());
    $userId = Filter::filterVar($data->userId, FILTER_VALIDATE_INT);
 
    // No validation ensures that a non-SuperAdmin is prohibited from modifying a SuperAdmin
    $user = $this->userService->getUserById($userId);
    $user->setLogin($data->login);
    $user->setEmail($data->email);
    $user->setDisplayName($data->displayName);
 
    $this->userService->updateUser($user);
    return $this->json(['status' => 'success']);
}

To remediate this structural flaw, the application must enforce an explicit validation check. It must verify that a standard administrator cannot execute modifications targeting a SuperAdmin account.

// MITIGATED CODE PATH
public function editUser(Request $request): JsonResponse
{
    // Step 1: Execute general administrative authorization check
    $this->userHasUserPermission();
 
    $currentUser = CurrentUser::getCurrentUser($this->configuration);
    $data = json_decode($request->getContent());
    $userId = Filter::filterVar($data->userId, FILTER_VALIDATE_INT);
 
    // Step 2: Retrieve target account details
    $targetUser = $this->userService->getUserById($userId);
 
    // Step 3: Reject modification if the target is a SuperAdmin and the actor is not
    if ($targetUser->isSuperAdmin() && !$currentUser->isSuperAdmin()) {
        return $this->json(
            ['error' => 'Unauthorized modification of SuperAdmin records'],
            Response::HTTP_FORBIDDEN
        );
    }
 
    // Proceed with state updates only if validation criteria are met
    $targetUser->setLogin($data->login);
    $targetUser->setEmail($data->email);
    $this->userService->updateUser($targetUser);
 
    return $this->json(['status' => 'success']);
}

Exploitation Methodology & Proof of Concept

An attacker with low-privilege administrative access can achieve complete system takeover via two distinct vectors. These abuse the functional omissions in editUser and updateUserRights respectively.

In Vector A, the attacker targets the editUser endpoint to modify the SuperAdmin's email address. The attacker constructs a PUT request containing the targeted SuperAdmin ID alongside an email address controlled by the attacker.

PUT /admin/api/user/edit HTTP/1.1
Host: target-phpmyfaq.local
Content-Type: application/json
Cookie: phpMyFAQ=session_cookie_here
X-CSRF-Token: valid_csrf_token_here
 
{
  "userId": 1,
  "login": "admin",
  "email": "attacker@controlled-domain.com",
  "displayName": "Administrator"
}

Because of the missing vertical authorization checks, the backend processes the request and updates the database record. The attacker then uses the application's native "Forgot Password" feature. This generates a recovery token and delivers it to the attacker's server, completing the compromise of the primary administrator account.

In Vector B, the attacker targets the updateUserRights endpoint. This allows them to alter group associations or direct access control list (ACL) mapping. The attacker sends a request specifying their own userId and assigns high-privilege roles or permissions.

Security Impact Assessment

This vulnerability completely undermines the tenant and administrative privilege isolation within the phpMyFAQ application. By escalating privileges to SuperAdmin status, an attacker gains unrestricted read, write, and execute permissions across the system. This allows them to view all database tables, modify internal portal content, and alter system configurations.

In a standard system setup, an attacker with SuperAdmin access can also execute arbitrary PHP code on the underlying web server. This is achieved by utilizing the system's administrative file-upload or template-modification utilities. Consequently, the IDOR vulnerability in the API leads directly to remote code execution (RCE).

This vulnerability is analyzed using the CVSS v3.1 vector string below. The scope remains unchanged because the compromise occurs within the same application logical context, though the impact on integrity, confidentiality, and availability is absolute.

Remediation and Defense-in-Depth

To remediate this vulnerability, administrators must update the phpMyFAQ installation to a version that includes the completed authorization patch. Standard configuration changes are insufficient because the vulnerability resides directly in the API controller logic.

Organizations that cannot apply the patch immediately should restrict access to the administration directory. This can be done by enforcing network-level restrictions, such as IP address allowlists or Virtual Private Network (VPN) requirements. Additionally, security teams can implement Web Application Firewall (WAF) rules to inspect and block incoming administrative PUT requests to /admin/api/user/* if the payload targets critical accounts.

To ensure defense-in-depth, configure the database with the principle of least privilege. In addition, enable detailed administrative logging to capture all requests destined for user modification endpoints.

Technical Appendix

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

Affected Systems

phpMyFAQ deployments with administrative API routes enabled

Affected Versions Detail

Product
Affected Versions
Fixed Version
phpMyFAQ
thorsten
<= 4.1.3-
AttributeDetail
CWE IDCWE-639
Attack VectorNetwork
CVSS v3.1 Score8.8
EPSS ScoreNot Available
Vulnerability TypeInsecure Direct Object Reference (IDOR)
ImpactPrivilege Escalation & Account Takeover
Exploit Statuspoc
KEV StatusNo

MITRE ATT&CK Mapping

T1078Valid Accounts
Defense Evasion
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-639
Authorization Bypass Through User-Controlled Key

The system fails to restrict user-controlled identifiers when updating sensitive account properties, permitting unauthorized entities to alter parameters belonging to target records.

Vulnerability Timeline

Disclosure of original IDOR vulnerability (GHSA-xvp4-phqj-cjr3 / CVE-2026-35671)
2026-05-20
Security researchers identify bypass potential in editUser and updateUserRights
2026-05-22
Publication of GHSA-985R-Q3QP-299H advisory detailing incomplete fix
2026-05-25

References & Sources

  • [1]GHSA-985R-Q3QP-299H Advisory Page
  • [2]Predecessor Advisory (GHSA-xvp4-phqj-cjr3)
  • [3]Vendor Code Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 4 hours ago•CVE-2026-48788
8.2

CVE-2026-48788: Cross-Site Scripting and Content-Type Spoofing in Remark42 Image Proxy

A critical-severity Cross-Site Scripting (XSS) and Content-Type spoofing vulnerability in Remark42 (versions 1.6.0 through 1.15.0) allows remote attackers to execute arbitrary client-side script code via a crafted image proxy request.

Alon Barad
Alon Barad
6 views•6 min read
•about 7 hours ago•CVE-2026-53462
5.9

CVE-2026-53462: Heap Use-After-Free Vulnerability in ImageMagick Vector Drawing Subsystem

CVE-2026-53462 is a heap Use-After-Free (UAF) vulnerability in ImageMagick's vector drawing subsystem, specifically within the coordinate allocation mechanism in CheckPrimitiveExtent. By parsing a crafted vector image (such as SVG or MVG) with extremely complex primitives, an attacker can trigger a memory reallocation failure. If the application fails to handle this allocation failure cleanly, it leaves a dangling pointer that can subsequently be accessed or freed again, causing memory corruption or an application crash.

Alon Barad
Alon Barad
7 views•7 min read
•about 9 hours ago•CVE-2026-39832
9.1

CVE-2026-39832: Silent Drop of Destination Constraints in golang.org/x/crypto SSH Agent Client

A critical security flaw was identified in the Go package golang.org/x/crypto/ssh/agent. The vulnerability arises during the serialization of key constraints when adding SSH identities to a remote agent or an in-memory keyring. Specifically, custom constraint extensions, such as destination restrictions like restrict-destination-v00@openssh.com, were silently omitted from serialization in client requests. This omission allowed keys to be loaded into the remote agent with zero destination-based restrictions, enabling unauthorized users with access to the agent socket on intermediate hosts to authenticate to any downstream host without policy enforcement. The issue was resolved in version v0.52.0 of the golang.org/x/crypto library.

Amit Schendel
Amit Schendel
9 views•7 min read
•about 10 hours ago•CVE-2026-46597
7.5

CVE-2026-46597: Remote Denial of Service in golang.org/x/crypto/ssh via AES-GCM Padding Integer Overflow

A high-severity Denial of Service (DoS) vulnerability (CVE-2026-46597 / GO-2026-5013) exists in the golang.org/x/crypto/ssh module before version v0.52.0. The flaw stems from an incorrect operator order during a type conversion of the GCM packet padding size, allowing a remote, unauthenticated attacker to trigger an out-of-bounds slice runtime panic and crash the Go process.

Alon Barad
Alon Barad
6 views•7 min read
•about 14 hours ago•CVE-2026-39828
6.3

CVE-2026-39828: Go SSH Server PartialSuccessError Permissions Discard Bypass

A critical security bypass vulnerability was discovered in the Go SSH server implementation within the golang.org/x/crypto/ssh package. When an SSH server authentication callback returned a PartialSuccessError alongside non-nil Permissions, the server silently discarded these permissions before the subsequent authentication step. Consequently, once the user completed the second-factor authentication, the session-level restrictions were dropped, granting the client unauthorized capabilities.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 15 hours ago•CVE-2026-39835
5.3

CVE-2026-39835: Remote Denial of Service via Null Pointer Dereference in Go SSH CertChecker

A Denial of Service (DoS) vulnerability exists in the Go SSH implementation package (golang.org/x/crypto/ssh). The vulnerability is caused by a null pointer dereference (runtime panic) when CertChecker is utilized as a public key callback but its validation fields, IsUserAuthority or IsHostAuthority, are uninitialized.

Amit Schendel
Amit Schendel
11 views•7 min read