phpMyFAQ: Attachment download allowed without dlattachment right (broken access control)
Summary
A logged‑in user without the dlattachment right can download FAQ attachments. This is due to a permissive permission check in attachment.php that treats the mere presence of a right key as authorization and a flawed group/user logic expression.
Details
In attachment.php, the access decision uses:
($groupPermission || ($groupPermission && $userPermission)) && isset($permission['dlattachment'])
isset() returns true even when the right value is false, and the logic simplifies to $groupPermission for some permission modes. As a result, a user without dlattachment can still access the attachment.
PoC
Precondition: A non‑admin user exists; an attachment is associated to a FAQ record; records.allowDownloadsForGuests = false. Log in as a non‑admin user without dlattachment. Request the attachment download endpoint.
curl -c /tmp/pmf_api_cookies.txt \
-H 'Content-Type: application/json' \
-d '{"username":"tester","password":"Test1234!"}' \
http://192.168.40.16/phpmyfaq/api/v3.0/login
curl -i -b /tmp/pmf_api_cookies.txt \
"http://192.168.40.16/phpmyfaq/index.php?action=attachment&id=1"
Impact
Unauthorized users can download attachments (confidentiality breach). Depending on content, this may expose sensitive documents.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | phpmyfaq/phpmyfaq | < 4.0.17 | 4.0.17 |
| Composer package | thorsten/phpmyfaq | < 4.0.17 | 4.0.17 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N- Weakness (CWE)
CWE-284- Platform
- Composer
- Package
phpmyfaq/phpmyfaq, thorsten/phpmyfaq- Disclosed
- 23.01.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-7p9h-m7m8-vhhv - CC BY 4.0
Vulnerability history: phpmyfaq/phpmyfaq
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 47
- First → latest
- 10.2022 09.2026
- Without a fix
- 2
- Exploited in attacks
- 0
Severity breakdown
- Critical 2
- High 18
- Medium 25
- Low 2
Disclosures per year
- 2022: 1
- 2023: 0
- 2024: 11
- 2025: 3
- 2026: 32
-
phpMyFAQ: Attachment download allowed without dlattachment right (broken access control) this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.