GHSA-7m8g-fprr-47fx
MEDIUMphpMyFAQ vulnerable to stored XSS on attachments filename
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
phpmyfaq/phpmyfaqReal-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
Unsafe echo of filename in phpMyFAQ\phpmyfaq\admin\attachments.php leading to allow execute JavaScript code in client side (XSS)
Details
On that snippet code of rendering the file attachments from user tables
<?php foreach ($crumbs as $item) : ?>
<tr id="attachment_<?= $item->id ?>" title="<?= $item->thema ?>">
<td><?= $item->id ?></td>
<td><?= $item->filename ?></td>
<td><?= $item->record_lang ?></td>
<td><?= Utils::formatBytes($item->filesize) ?></td>
<td><?= $item->mime_type ?></td>
<td>
The data directly rendering with short hand echo without any sanitation first, its recommend to use existing class of Strings::htmlentities on use phpMyFAQ\Strings;
<td><?= Strings::htmlentities($item->filename); ?></td>
<td><?= Strings::htmlentities($item->record_lang); ?></td>
<td><?= Utils::formatBytes($item->filesize) ?></td>
<td><?= Strings::htmlentities($item->mime_type); ?></td>
Propose fixing on that pull request https://github.com/thorsten/phpMyFAQ/pull/2827
PoC
- An attacker with permission will upload the attachments image on http://{base_url}/admin/?action=editentry
- On endpoint of ajax upload image POST /admin/index.php?action=ajax&ajax=att&ajaxaction=upload
- Change the originally name file on parameters filename to a XSS payload
- The XSS will trigger on attachment pages /admin/?action=attachments
-
Trigger XSS

-
Payload XSS
<img width="1000" alt="image" src="https://user-images.githubusercontent.com/37658579/301022571-d6cdd166-b1f9-4062-87c5-c8bbb308cd5d.png">
Impact
This vulnerability will allow an attacker with a permissions of uploading an attachment to storing the payload of XSS on database specific table faqattachment columns filename.
The XSS payload could be rendering on page that listing the file on tables, and impact to others user that on the hierarchy.
The payload XSS have several attack scenario such like
- Stealing the cookies (isn’t possible since HttpOnly)
- Crashing the application with a looping javascript payload
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | phpmyfaq/phpmyfaq | all versions | 3.2.5 |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phpmyfaq/phpmyfaq. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update phpmyfaq/phpmyfaq to 3.2.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-7m8g-fprr-47fx is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-7m8g-fprr-47fx is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-7m8g-fprr-47fx. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-7m8g-fprr-47fx in your dependencies?
O3 detects GHSA-7m8g-fprr-47fx across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.