Mittel

phpMyFAQ has an Authorization Bypass in All Admin Pages Due to Non-Terminating Permission Check

  • Veröffentlicht: 06.05.2026
  • Aktualisiert: 11.10.2026 10:22

Summary

AbstractAdministrationController::userHasPermission() catches the ForbiddenException thrown when a user lacks a specific permission, sends a "forbidden" HTML page via $response->send(), but does not terminate execution. The calling controller method continues to execute, fetches protected data, renders the full template, and returns it as a Response. The final $response->send() in admin/index.php outputs the protected page content after the forbidden page, leaking all permission-protected admin data to any authenticated admin user regardless of their actual permissions.

Details

The parent class AbstractController::userHasPermission() (phpmyfaq/src/phpMyFAQ/Controller/AbstractController.php:317-327) correctly enforces authorization by throwing a ForbiddenException when the user lacks the required permission. This exception would normally propagate to Symfony's HttpKernel exception handler, which would return an error response and prevent the controller from continuing.

However, AbstractAdministrationController overrides this method at line 390-399:

php
#[\Override]
protected function userHasPermission(PermissionType $permissionType): void
{
    try {
        parent::userHasPermission($permissionType);
    } catch (ForbiddenException $exception) {
        $response = $this->getForbiddenPage($exception->getMessage());
        $response->send();  // Outputs HTML but does NOT terminate execution
    } catch (Exception $exception) {
        $this->configuration->getLogger()->error($exception->getMessage());
        // Only logs, no response, no termination
    }
}

The critical flaw: after $response->send() at line 396, there is no exit(), die(), return, or re-throw. PHP execution continues normally into the calling controller method.

For example, in AdminLogController::index() (phpmyfaq/src/phpMyFAQ/Controller/Administration/AdminLogController.php:45-83):

php
public function index(Request $request): Response
{
    $this->userHasPermission(PermissionType::STATISTICS_ADMINLOG);
    // ^^^ If user lacks permission: forbidden page is echoed, but execution continues

    // ... all of this still executes:
    $loggingData = $this->adminLog->getAll();  // Fetches ALL admin log entries
    // ...
    return $this->render('@admin/statistics/admin-log.twig', [
        // ... full admin log data including IPs, usernames, actions
        'loggingData' => $currentItems,
    ]);
}

The entry point admin/index.php then calls $response->send() on the returned Response, appending the full protected page to the already-sent forbidden page in the HTTP response body.

The second catch block (line 397-398) for generic Exception is even worse — it only logs the error without sending any response or terminating, so the protected page renders with no forbidden notice at all.

58 admin controllers extend AbstractAdministrationController and call userHasPermission(), meaning every permission-protected admin page is affected. This includes:

  • Admin logs (user IPs, actions, usernames)
  • User management (user data, permissions)
  • System information (server configuration, PHP info)
  • Configuration pages (all application settings)
  • Backup pages
  • All other admin functionality

PoC

  1. Create a test admin user with minimal permissions (e.g., only FAQ editing, no statistics access):

  2. Authenticate as the limited admin user and request a permission-protected page:

bash
# Get admin session cookies by logging in
curl -c cookies.txt -d 'faqusername=limited_admin&faqpassword=password&pmf-csrf-token=TOKEN' \
  'https://TARGET/admin/?action=login'

# Access admin log page (requires STATISTICS_ADMINLOG permission)
curl -b cookies.txt -s 'https://TARGET/admin/statistics/admin-log' | tee response.html

# The response contains BOTH the forbidden page HTML AND the full admin log:
grep -c 'You are not allowed' response.html    # 1 — forbidden page was sent
grep -c 'loggingData\|ad_adminlog_ip' response.html  # matches — admin log data also present

# Access system information (requires CONFIGURATION_EDIT permission)  
curl -b cookies.txt -s 'https://TARGET/admin/system-information' | tee sysinfo.html
# Contains PHP version, extensions, database info, server configuration
  1. The HTTP response body contains the forbidden page HTML followed by the full protected page HTML, including all sensitive data.

Impact

Any authenticated admin user — even one with zero administrative permissions beyond basic login — can access every permission-protected admin page by simply requesting its URL. The permission check sends a forbidden page but does not stop execution, so the protected content is always appended to the response.

Exposed data includes:

  • Admin logs: All admin users' IP addresses, actions, and timestamps
  • User management: User accounts, email addresses, permissions
  • System information: PHP configuration, database details, server paths
  • Configuration: All application settings including security-sensitive values
  • Backups: Database export functionality

This effectively renders the entire admin permission system non-functional for the 58 page controllers using AbstractAdministrationController.

Recommended Fix

Add return after sending the forbidden response, and re-throw for the generic Exception case:

php
#[\Override]
protected function userHasPermission(PermissionType $permissionType): void
{
    try {
        parent::userHasPermission($permissionType);
    } catch (ForbiddenException $exception) {
        $response = $this->getForbiddenPage($exception->getMessage());
        $response->send();
        exit;  // Terminate execution to prevent controller from continuing
    } catch (Exception $exception) {
        $this->configuration->getLogger()->error($exception->getMessage());
        throw $exception;  // Re-throw to prevent controller from continuing
    }
}

A cleaner architectural fix would be to not swallow the exception at all, and instead let it propagate to the Symfony HttpKernel exception handler (which already handles ForbiddenException via WebExceptionListener):

php
#[\Override]
protected function userHasPermission(PermissionType $permissionType): void
{
    // Simply delegate to parent — let ForbiddenException propagate
    // to the WebExceptionListener which renders the appropriate error page
    parent::userHasPermission($permissionType);
}

Or remove the override entirely, since the WebExceptionListener registered in the Kernel already handles exception-to-response conversion.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Composer-Paket phpmyfaq/phpmyfaq < 4.1.2 4.1.2
Composer-Paket thorsten/phpmyfaq < 4.1.2 4.1.2

Verweise

CVSS-Wert 6.5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Schwäche (CWE)
CWE-863
Plattform
Composer
Paket
phpmyfaq/phpmyfaq, thorsten/phpmyfaq
Veröffentlicht
06.05.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-hpgw-ww76-c68r - CC BY 4.0

Schwachstellenhistorie: thorsten/phpmyfaq

Alle veröffentlichten Schwachstellen dieses Pakets (Composer-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (112) im Archiv
Einträge insgesamt
112
Erste → letzte
05.2022 09.2026
Ohne Fix
2
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 8
  • Hoch 36
  • Mittel 67
  • Niedrig 1

Veröffentlichungen pro Jahr

  1. 2022: 8
  2. 2023: 62
  3. 2024: 2
  4. 2025: 6
  5. 2026: 34
Schweregrad:
  1. Hoch · 8.1 CVE-2026-56737 >= 3.2.0, < 4.1.6 4.1.6
  2. Hoch · 7.5 CVE-2026-35672 < 4.1.3 4.1.3
  3. Hoch · 8.8 CVE-2026-35671 < 4.1.3 4.1.3
  4. phpMyFAQ has an Authorization Bypass in All Admin Pages Due to Non-Terminating Permission Check dieser Eintrag
    Mittel · 6.5 CVE-2026-46362 < 4.1.2 4.1.2
  5. Hoch · 7.6 CVE-2026-46367 >= 4.1.1, < 4.1.2 4.1.2
  6. Hoch · 7.5 CVE-2025-69200 < 4.0.16, >= 4.1.0-alpha, <= 4.1.0-beta.2 4.0.16
  7. Hoch · 8.1 CVE-2025-59943 >= 4.0.7, < 4.0.13 4.0.13
  8. Hoch · 7.6 CVE-2023-5865 < 3.2.2 3.2.2
  9. Hoch · 7.4 CVE-2023-5864 < 3.2.1 3.2.1
  10. Hoch · 8.3 CVE-2023-5319 < 3.1.18 3.1.18
  11. Kritisch · 9.0 CVE-2023-5320 < 3.1.18 3.1.18
  12. Kritisch · 9.1 CVE-2023-5316 < 3.1.18 3.1.18
  13. Hoch · 8.8 CVE-2023-4007 < 3.1.16 3.1.16
  14. Hoch · 8.2 CVE-2023-2550 < 3.1.13 3.1.13
  15. Hoch · 8.3 CVE-2023-1887 < 3.1.12 3.1.12
  16. Hoch · 7.3 CVE-2023-1886 < 3.1.12 3.1.12
  17. Kritisch · 9.8 CVE-2023-0788 < 3.1.11 3.1.11
  18. Kritisch · 9.8 CVE-2023-0789 < 3.1.11 3.1.11
  19. Hoch · 8.8 CVE-2023-0790 < 3.1.11 3.1.11
  20. Hoch · 8.8 CVE-2023-0793 < 3.1.11 3.1.11
Mehr anzeigen (5) 40 von 45 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.