GHSA-7CX3-2QX2-3G6W

GHSA-7CX3-2QX2-3G6W is a medium-severity missing authorization vulnerability in phpmyfaq/phpmyfaq (composer), affecting versions <= 4.1.1. It is fixed in 4.1.2.

Summary

The TagController::delete() endpoint at DELETE /admin/api/content/tags/{tagId} only verifies that the user is logged in (userIsAuthenticated()), but does not check any permission. Any authenticated user, including regular non-admin frontend users, can delete any tag by ID. This contrasts with TagController::update() and TagController::search(), which both enforce the FAQ_EDIT permission.

Details

In phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/TagController.php, the delete() method (line 121-133) uses only $this->userIsAuthenticated():

#[Route(path: 'content/tags/{tagId}', name: 'admin.api.content.tags.id', methods: ['DELETE'])]
public function delete(Request $request): JsonResponse
{
    $this->userIsAuthenticated();  // Only checks isLoggedIn(), no permission check

    $tagId = (int) Filter::filterVar($request->attributes->get('tagId'), FILTER_VALIDATE_INT);

    if ($this->tags->delete($tagId)) {
        return $this->json(['success' => Translation::get(key: 'ad_tag_delete_success')], Response::HTTP_OK);
    }

    return $this->json(['error' => Translation::get(key: 'ad_tag_delete_error')], Response::HTTP_BAD_REQUEST);
}

Compare with update() (line 48-71) which properly enforces authorization:

public function update(Request $request): JsonResponse
{
    $this->userHasPermission(PermissionType::FAQ_EDIT);  // Proper permission check
    // ... also verifies CSRF token ...
}

The userIsAuthenticated() method in AbstractController (line 258-263) only checks $this->currentUser->isLoggedIn():

protected function userIsAuthenticated(): void
{
    if (!$this->currentUser->isLoggedIn()) {
        throw new UnauthorizedHttpException(challenge: 'User is not authenticated.');
    }
}

There is no admin-level middleware in the Kernel, it registers only RouterListener, LanguageListener, ControllerContainerListener, and exception listeners. The admin API entry point (admin/api/index.php) shares the same bootstrap and session as the frontend, meaning a frontend user's session cookie is valid for admin API requests.

Additionally, this endpoint lacks CSRF token verification (unlike update()), though the primary issue is the missing authorization since the attack vector is a logged-in user acting directly.

PoC

# Step 1: Register as a regular user on the phpMyFAQ frontend
# (or use any existing non-admin authenticated session)

# Step 2: As the authenticated non-admin user, delete tag with ID 1:
curl -X DELETE 'https://target.com/admin/api/content/tags/1' \
  -H 'Cookie: PHPSESSID=<regular_user_session>'

# Expected: 401 or 403 (user lacks FAQ_EDIT permission)
# Actual: 200 OK with {"success": "..."}

# Step 3: Enumerate and delete all tags:
for i in $(seq 1 100); do
  curl -s -X DELETE "https://target.com/admin/api/content/tags/$i" \
    -H 'Cookie: PHPSESSID=<regular_user_session>'
done

Impact

Any authenticated user (including regular frontend users who registered through the public registration form) can delete all tags in the phpMyFAQ instance. This results in:

  • Data integrity loss: Tags are permanently deleted from the database. All FAQ-to-tag associations are destroyed.
  • Disruption of FAQ organization: Tag-based navigation, filtering, and tag clouds become empty or broken.
  • No recoverability without backup: Deleted tags and their associations cannot be restored without a database backup.

The impact is limited to tags (not FAQ content itself), but in large installations with extensive tag taxonomies, this could significantly degrade usability.

The application does not perform an authorization check before performing a sensitive operation. Typical impact: unauthorized access to restricted functionality or data.

GHSA-7CX3-2QX2-3G6W has a CVSS score of 5.4 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (4.1.2); upgrading removes the vulnerable code path.

Affected versions

phpmyfaq/phpmyfaq (<= 4.1.1) thorsten/phpmyfaq (<= 4.1.1)

Security releases

phpmyfaq/phpmyfaq → 4.1.2 (composer) thorsten/phpmyfaq → 4.1.2 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Add the FAQ_EDIT permission check and CSRF token verification to TagController::delete(), consistent with TagController::update():

#[Route(path: 'content/tags/{tagId}', name: 'admin.api.content.tags.id', methods: ['DELETE'])]
public function delete(Request $request): JsonResponse
{
    $this->userHasPermission(PermissionType::FAQ_EDIT);

    $tagId = (int) Filter::filterVar($request->attributes->get('tagId'), FILTER_VALIDATE_INT);

    if ($this->tags->delete($tagId)) {
        return $this->json(['success' => Translation::get(key: 'ad_tag_delete_success')], Response::HTTP_OK);
    }

    return $this->json(['error' => Translation::get(key: 'ad_tag_delete_error')], Response::HTTP_BAD_REQUEST);
}

At minimum, add $this->userHasPermission(PermissionType::FAQ_EDIT) to enforce the same authorization as the update and search endpoints. Consider also adding a dedicated TAG_DELETE permission type for more granular access control.

Frequently Asked Questions

  1. What is GHSA-7CX3-2QX2-3G6W? GHSA-7CX3-2QX2-3G6W is a medium-severity missing authorization vulnerability in phpmyfaq/phpmyfaq (composer), affecting versions <= 4.1.1. It is fixed in 4.1.2. The application does not perform an authorization check before performing a sensitive operation.
  2. How severe is GHSA-7CX3-2QX2-3G6W? GHSA-7CX3-2QX2-3G6W has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by GHSA-7CX3-2QX2-3G6W?
    • phpmyfaq/phpmyfaq (composer) (versions <= 4.1.1)
    • thorsten/phpmyfaq (composer) (versions <= 4.1.1)
  4. Is there a fix for GHSA-7CX3-2QX2-3G6W? Yes. GHSA-7CX3-2QX2-3G6W is fixed in 4.1.2. Upgrade to this version or later.
  5. Is GHSA-7CX3-2QX2-3G6W exploitable, and should I be worried? Whether GHSA-7CX3-2QX2-3G6W is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-7CX3-2QX2-3G6W is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-7CX3-2QX2-3G6W?
    • Upgrade phpmyfaq/phpmyfaq to 4.1.2 or later
    • Upgrade thorsten/phpmyfaq to 4.1.2 or later

Other vulnerabilities in phpmyfaq/phpmyfaq

CVE-2026-49205CVE-2026-48488CVE-2026-35675CVE-2026-35672CVE-2026-35671

Stop the waste.
Protect your environment with Kodem.