GHSA-88g4-74f3-63x9: phpMyFAQ has Potential Authenticated Path Traversal in PDF Export
Summary There is an authenticated path traversal condition in the PDF export functionality, specifically within the PDF image resolution logic. The issue may allow a privileged FAQ editor to cause the application to attempt reading files outside the intended content directory during PDF generation.
Published Aug 25, 2026
Affected packages
thorsten/phpmyfaq
- Ecosystem
- Composer (PHP)
- Affected
- >= 4.0.0-alpha, <= 4.1.4
- Fixed in
- 4.1.5
- Check
composer show thorsten/phpmyfaq
phpmyfaq/phpmyfaq
- Ecosystem
- Composer (PHP)
- Affected
- >= 4.0.0-alpha, <= 4.1.4
- Fixed in
- 4.1.5
- Check
composer show phpmyfaq/phpmyfaq
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
There is an authenticated path traversal condition in the PDF export functionality, specifically within the PDF image resolution logic.
The issue may allow a privileged FAQ editor to cause the application to attempt reading files outside the intended content directory during PDF generation.
---
Affected Component
File: src/phpMyFAQ/Export/Pdf/Wrapper.php
Function: concatenatePaths()
---
Root Cause
The path resolution logic relies on locating the substring "content" within a user-controlled path:
$pos = strpos($trimmedFile, 'content');
$relativePath = substr($trimmedFile, (int) $pos);If "content" is not present, strpos() returns false, which becomes 0 when cast to an integer.
As a result, the entire attacker-controlled path is preserved.
Example:
$trimmedFile = "../../../etc/passwd";
$pos = false;
$relativePath = "../../../etc/passwd";The resulting path is later processed by:
file_get_contents($resolvedPath);without canonicalization or a root-directory containment check.
---
Observed Data Flow
FAQ Content
->
PDF Export
->
WriteHTML()
->
Wrapper::Image()
->
concatenatePaths()
->
file_get_contents()---
Potential Impact
Based on code review, a user with FAQ editing privileges may be able to store HTML containing crafted image paths that are processed during PDF generation.
Potential consequences may include:
- Path traversal outside the intended content directory
- Local file read attempts during PDF export
- Possible disclosure of readable files depending on file type, sanitization behavior, and PDF rendering constraints
---
Discovery Method
This issue was initially detected by an internally developed SAST tool during analysis of the phpMyFAQ source code.
The finding was then manually investigated and validated through code review.
While the original scanner output classified the issue as a generic path traversal/local file inclusion pattern, manual analysis identified the specific root cause in the path resolution logic of concatenatePaths().
---
Potential Exploitation Scenario
The following scenario is based on code review and intended to illustrate the potential impact:
- A user with FAQ editing privileges creates or modifies a FAQ entry.
- The FAQ content contains an HTML image tag with a crafted relative path that does not include the expected
contentdirectory reference.
- The HTML content is stored and later processed by the PDF export functionality.
- When a user requests the PDF version of the FAQ, the application invokes
WriteHTML(), which eventually reachesWrapper::Image().
concatenatePaths()constructs a filesystem path without canonicalization or directory containment validation.
- The resulting path reaches
file_get_contents(), causing the application to attempt reading a file outside the intended content directory.
- Depending on sanitization behavior, file permissions, image validation, and PDF rendering behavior, the contents of the targeted file may potentially be exposed to the PDF consumer.
Based on my current analysis, exploitation would require a user capable of editing FAQ content and is therefore not considered an anonymous or unauthenticated attack vector.
---
Suggested Remediation
Consider replacing substring-based path anchoring with:
realpath()canonicalization- Strict root-directory containment checks
- Explicit allowlisting of permitted image locations
Credited to DomainXTech.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-56736
phpMyFAQ has Stored XSS in Admin FAQ Editor via HTML Entity Bypass in Frontend FAQ Submission
high8.2Sep 24, 2026CVE-2026-56737
phpMyFAQ's two-factor authentication login bypasses the password factor
high8.1Sep 24, 2026CVE-2026-56738
phpMyFAQ has SQL Injection in `StopWords::add()` — Unescaped Stop Word Insertion
high8.5Sep 24, 2026GHSA-mf8r-wm2w-f8c5
phpMyFAQ public FAQ APIs expose inactive FAQ content
medium5.3Aug 25, 2026GHSA-pg62-f8g4-4wqh
phpMyFAQ privilege escalation: GroupController::updatePermissions lets a GROUP_EDIT admin grant rights they do not hold
high8.8Aug 25, 2026CVE-2026-47132
phpMyFAQ: SQL LIKE Wildcard Injection in Chat User Search Allows Authenticated User Enumeration
medium5.4Aug 12, 2026
