Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
MEDIUM severity

phpMyFAQ has Potential Authenticated Path Traversal in PDF ExportGHSA-88g4-74f3-63x9

MEDIUMFix: thorsten/phpMyFAQ@91ce644

GHSA-88g4-74f3-63x9 is a medium-severity (CVSS 4.9) Path Traversal vulnerability in thorsten/phpmyfaq. A fix is available for thorsten/phpmyfaq — see the affected versions and patch details below.

Also known asCVE-2026-57961
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Oct 9, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-88g4-74f3-63x9.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs32th percentile — riskier than 32% of all scored CVEsHighest risk
0.00%0.30%0.60%0.90%0.3%0.4%0.4%0.4%Aug 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-88g4-74f3-63x9 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 384,993 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected
🐘thorsten/phpmyfaq🐘phpmyfaq/phpmyfaq

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

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:

  1. A user with FAQ editing privileges creates or modifies a FAQ entry.

  2. The FAQ content contains an HTML image tag with a crafted relative path that does not include the expected content directory reference.

  3. The HTML content is stored and later processed by the PDF export functionality.

  4. When a user requests the PDF version of the FAQ, the application invokes WriteHTML(), which eventually reaches Wrapper::Image().

  5. concatenatePaths() constructs a filesystem path without canonicalization or directory containment validation.

  6. The resulting path reaches file_get_contents(), causing the application to attempt reading a file outside the intended content directory.

  7. 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

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistthorsten/phpmyfaq≥ 4.0.0-alpha&&< 4.1.54.1.5composer require thorsten/phpmyfaq:^4.1.5
🐘Packagistphpmyfaq/phpmyfaq≥ 4.0.0-alpha&&< 4.1.54.1.5composer require phpmyfaq/phpmyfaq:^4.1.5

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for thorsten/phpmyfaq, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update thorsten/phpmyfaq to 4.1.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-88g4-74f3-63x9 is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Frequently Asked Questions

## 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'); $relativePa
O3 Security · Impact-Aware SCA

Is GHSA-88g4-74f3-63x9 in your dependencies?

Find it across Packagist, including transitive dependencies.

phpMyFAQ has Potential Authenticated Path Traversal in…