Executive brief
phpMyFAQ is an open-source FAQ software platform. A security flaw in the PDF export feature allows authorized users with FAQ editing permissions to potentially access sensitive files on the underlying server. By creating a FAQ entry with a specially crafted image path, an attacker could trick the system into reading files outside of the intended directory when generating a PDF document.
Technical details
A path traversal vulnerability exists in the `concatenatePaths()` function within `src/phpMyFAQ/Export/Pdf/Wrapper.php`. The application uses `strpos()` to find the substring 'content' in a user-provided path; if the substring is missing, `strpos()` returns false, which is cast to integer 0, causing the application to process the entire attacker-controlled path (e.g., using '../' sequences). This path is subsequently passed to `file_get_contents()` without canonicalization or root-directory validation. An attacker with FAQ editing privileges can exploit this by embedding crafted image tags in FAQ content, potentially leading to local file disclosure during PDF generation. The issue is fixed in version 4.1.5.
Affected products
- phpMyFAQ phpMyFAQ < 4.1.5
Timeline
- 2026-06-14: advisory: Vendor advisory published on GitHub
- 2026-07-10: disclosed: NVD publication date