CVE-2026-57961: phpMyFAQ Authenticated Path Traversal in PDF Export
phpMyFAQ versions before 4.1.5 contain a path traversal vulnerability that allows authenticated users with FAQ editing privileges to read files outside the intended content directory. An attacker would craft malicious image paths in HTML content stored in FAQ entries. When that content is exported to PDF, the vulnerable path-resolution logic fails to properly constrain file access, potentially exposing sensitive files on the server. This requires both authentication and FAQ editing permissions, significantly limiting the attack surface.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 2.7 LOW · CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N
- Weaknesses (CWE)
- CWE-22
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-10 / 2026-07-10
NVD description (verbatim)
phpMyFAQ before 4.1.5 contains a potential authenticated path traversal vulnerability in the concatenatePaths() function within src/phpMyFAQ/Export/Pdf/Wrapper.php. A user with FAQ editing privileges can store HTML containing crafted image paths that are processed during PDF generation. The path resolution logic locates the substring "content" within a user-controlled path using strpos(); when "content" is absent, strpos() returns false, which becomes 0 when cast to an integer, preserving the entire attacker-controlled path. This path is later passed to file_get_contents() without canonicalization or root-directory containment validation, which may allow reading of files outside the intended content directory.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in the concatenatePaths() function within src/phpMyFAQ/Export/Pdf/Wrapper.php. The function uses strpos() to locate the substring "content" within a user-supplied file path to establish a boundary for path normalization. When strpos() fails to find "content", it returns false, which is then cast to integer 0. This casting error causes the path-resolution logic to preserve the entire attacker-controlled path unchanged. The unvalidated path is subsequently passed to file_get_contents() during PDF generation without canonicalization or root-directory containment checks, enabling directory traversal and arbitrary file read access on the host system.
Business impact
The risk to most organizations is limited by the authentication and privilege requirements. However, organizations with multiple FAQ contributors or shared editing roles should evaluate whether internal users pose a threat to sensitive configuration files, database credentials, or private data that might be readable by the web server process. The exposure is restricted to confidentiality; integrity and availability are not affected. In low-trust environments or those with high staff turnover, unauthorized file disclosure could compromise system security posture.
Affected systems
phpMyFAQ versions before 4.1.5 are vulnerable. The vendor_products field in the source data is empty, indicating no specific product variants were enumerated in the ground-truth feed; however, all instances of phpMyFAQ below version 4.1.5 should be assumed in scope. Verify your installation version via the phpMyFAQ admin interface or package management system to confirm exposure.
Exploitability
Exploitation requires two preconditions: (1) valid authentication to the phpMyFAQ application, and (2) FAQ editing privileges. The attacker must then craft HTML with malicious image paths in a FAQ entry and trigger PDF export. No network-level exploit or public proof-of-concept is needed—the attack is a straightforward path traversal using directory-traversal sequences (e.g., ../) embedded in image src attributes. The barrier to exploitation is moderate due to privilege requirements, but once authenticated, the attack is reliable and requires minimal user interaction.
Remediation
Upgrade phpMyFAQ to version 4.1.5 or later. This update corrects the path-resolution logic to properly validate and canonicalize file paths before passing them to file operations. Organizations unable to upgrade immediately should restrict FAQ editing privileges to trusted administrators only and monitor PDF export logs for suspicious activity or unusual file-access patterns.
Patch guidance
1. Verify your current phpMyFAQ version in the admin dashboard or via the command line. 2. Back up your FAQ database and configuration files before upgrading. 3. Update to phpMyFAQ 4.1.5 or the latest available version from the official phpMyFAQ repository or vendor distribution channel. 4. Test PDF export functionality in a staging environment to ensure the patch does not break existing workflows. 5. After deployment, confirm the version upgrade and re-run any internal vulnerability scans to validate remediation.
Detection guidance
Monitor PDF export requests for unusual image source paths containing traversal sequences (e.g., ../, ..\ or encoded variants). Log FAQ content modifications and exports by user and timestamp. Review web server access logs for file_get_contents() errors or attempts to read files outside the /content directory during PDF generation. Consider implementing a Web Application Firewall (WAF) rule to block FAQ submissions containing image paths with directory-traversal indicators, as an interim preventive measure.
Why prioritize this
Although the CVSS score is 2.7 (LOW), this vulnerability warrants attention in any phpMyFAQ deployment with multiple FAQ editors or untrusted contributors. It is not remotely exploitable without authentication and does not affect confidentiality of the entire system—only files readable by the web server. Prioritization should be based on the sensitivity of data accessible to the web server process and the number of FAQ editors in your organization. Organizations with restrictive FAQ editing policies and dedicated FAQ administrators may safely defer this patch; those with broader contributor bases should upgrade sooner.
Risk score, explained
The CVSS 3.1 score of 2.7 reflects the low severity due to the requirement for authenticated access (PR:H, high privilege required) and the absence of network attack feasibility or impact to integrity and availability. The score accounts only for confidentiality loss (C:L). The score does not capture organization-specific risk; internal threat modeling and data sensitivity should inform your own risk decisions.
Frequently asked questions
Can this vulnerability be exploited without authentication?
No. The attacker must first authenticate to phpMyFAQ and possess FAQ editing privileges. Unauthenticated users cannot store or modify FAQ content and therefore cannot inject malicious image paths.
What files can an attacker read?
An attacker can read any file on the server that is readable by the web server process (typically the www-data or apache user). This typically includes configuration files, private keys, or database backups—depending on server configuration and file permissions. The attacker cannot write or modify files, only read them.
Are there any workarounds if I cannot upgrade immediately?
Temporarily restrict FAQ editing privileges to a small set of highly trusted administrators. Additionally, review recent FAQ modifications by all users and regenerate sensitive credentials (database passwords, API keys) if there is evidence of unauthorized PDF exports. Apply the patch as soon as feasible.
Does this vulnerability affect other phpMyFAQ functionality?
No. The vulnerability is specific to the PDF export feature and the concatenatePaths() function in the wrapper component. Standard FAQ browsing, searching, and other export formats (HTML, CSV) are not affected, provided no malicious content has already been stored in the FAQ database.
This analysis is based on the CVE description and available source data as of the publication date. Vendor advisories, patch availability, and KEV status should be verified directly with the phpMyFAQ project and official security channels. Organizations should conduct their own risk assessment based on their deployment, user trust model, and data sensitivity. No exploit code or proof-of-concept details are provided or endorsed by SEC.co. Use this intelligence as one input to your own vulnerability management and patching decisions. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2026-10264LOWPath Traversal in lharries whatsapp-mcp 0.0.1
- CVE-2026-12211LOWIntelbras iNVU 7016 FT Path Traversal Vulnerability Analysis
- CVE-2026-14967LOWBBOT Path Traversal in GitHub Workflows Module—Low-Risk Artifact Write Bypass
- CVE-2026-15326LOWHalo Path Traversal in Theme Installation (CWE-22)
- CVE-2026-41124LOWDell PowerProtect Data Domain Path Traversal (CVSS 2.3)
- CVE-2026-45380LOWOff-by-One Path Traversal in bit7z Archive Extraction
- CVE-2026-47712LOWDulwich Path-Traversal Vulnerability in Patch File Generation
- CVE-2026-49356LOWBabel @babel/core Arbitrary Source Map File Read Vulnerability