mediumCVSS 4.9Vulnerability

GHSA-88g4-74f3-63x9

## 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: ```php $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: ```php $trimmedFile = "../../../etc/passwd"; $pos = false; $relativePath = "../../../etc/passwd"; ``` The resulting path is later processed by: ```php file_get_contents($resolvedPath); ``` without canonicalization or a root-directory containment check. --- ## Observed Data Flow ```text 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

Properties

ghsa_id
GHSA-88g4-74f3-63x9
severity
medium
summary
phpMyFAQ has Potential Authenticated Path Traversal in PDF Export
cvss_score
4.9
cve_id
GHSA-88g4-74f3-63x9
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
is_ghsa_only
true
ghsa_published
2026-08-25T17:28:56Z
source_url
https://github.com/advisories/GHSA-88g4-74f3-63x9
ghsa_updated
2026-08-25T17:28:57Z

Related Entities (6)

VULNERABLE_TO (2)

[Software]composer/thorsten/phpmyfaq
[Software]composer/phpmyfaq/phpmyfaq

AFFECTS (2)

[Software]composer/thorsten/phpmyfaq
[Software]composer/phpmyfaq/phpmyfaq

HAS_WEAKNESS (1)

[Weakness]Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-88g4-74f3-63x9 (CVSS 4.9) — Ninja Signal Threat Intelligence | Ninja Signal