6.5medium
phpMyFAQ: Attachment download allowed without dlattachment right (broken access control)
- Severity
- 6.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.46% (higher than 41% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7p9h-m7m8-vhhv
Description
phpMyFAQ is an open source FAQ web application. Versions 4.0.16 and below allow an authenticated user without the dlattachment permission to download FAQ attachments due to a incomprehensive permissions check. The presence of a right key is improperly validated as proof of authorization in attachment.php. Additionally, the group and user permission logic contains a flawed conditional expression that may allow unauthorized access. This issue has been fixed in version
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| thorsten phpMyFAQ | < 4.0.17 | CVE List |
| phpmyfaq/phpmyfaq (Packagist) | before 4.0.17 | GitHub Advisory Database |
| thorsten/phpmyfaq (Packagist) | before 4.0.17 | GitHub Advisory Database |
| phpmyfaq phpmyfaq | before 4.0.17 | NVD |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
phpMyFAQ is an open source FAQ web application. Versions 4.0.16 and below allow an authenticated user without the dlattachment permission to download FAQ attachments due to a incomprehensive permissions check. The presence of a right key is improperly validated as proof of authorization in attachment.php. Additionally, the group and user permission logic contains a flawed conditional expression that may allow unauthorized access. This issue has been fixed in version
GitHub Advisory Database
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.
NVD (es)
phpMyFAQ es una aplicación web de FAQ de código abierto. Las versiones 4.0.16 e inferiores permiten a un usuario autenticado sin el permiso dlattachment descargar archivos adjuntos de FAQ debido a una verificación de permisos incompleta. La presencia de una clave correcta se valida incorrectamente como prueba de autorización en attachment.php. Además, la lógica de permisos de grupo y usuario contiene una expresión condicional defectuosa que puede permitir el acceso no autorizado. Este problema ha sido solucionado en la versión
References
| https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-7p9h-m7m8-vhhv | exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-24420 | advisory | |
| https://github.com/thorsten/phpMyFAQ | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-24420 changed 2026-01-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7p9h-m7m8-vhhv changed 2026-02-03 | CC-BY-4.0 |
| NVD | CVE-2026-24420 changed 2026-06-17 | Public domain |