CVE-2026-57961

lowpriority · track · 0EPSS 0.004 · 34 %ileEUUS
grimoire priorityP3 · Track
Exploitable?
—
no known exploitation
Likely / severe?
0.40% (34th) EPSS
CVSS 2.7 · low
Is it mine?
3 products
Check your exposure
Who says so?
3 sources
cnnvd · enisa_euvd · osv

EPSS · scored 2026-10-27

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.

01

cvss

Technical severity, 0–10. One row per scoring source.

5.1
010

base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 1.2–5.1

v3.12.7lowCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:Nsecondary · disclosure@vulncheck.comexploitability 1.2 · impact 1.4
v3.14.9mediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:Nsecondary · OSV
v4.05.1mediumCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:Nsecondary · ENISA EU
v4.05.1mediumCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Xsecondary · disclosure@vulncheck.com
v4.01.2lowCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Xsecondary · CVSS-BT (t0sche)
02

ssvc

A stakeholder decision — act, attend, or track — from exploitation and impact.

Trackcoordinatorcisa_ssvcUS
03

weaknesses

The CWE weakness classes this flaw belongs to.

04

affected products (3)

Products and version ranges known to be affected.

05

advisories (1)

Vendor and ecosystem advisories describing this.

  • GHSA-88g4-74f3-63x9phpMyFAQ has Potential Authenticated Path Traversal in PDF Export2026-08-25ghsa · osvUS

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

06

also known as (3)

Other names and identifiers for this entity.

07

sources

Which sources assert this record, and when.

published 2026-07-10modified 2026-07-10
08

references (6)

External citations — patches, advisories, analysis.

scry

Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.

Free scan