phpMyFAQ: Attachment download allowed without dlattachment right (broken access control)
Moderate severity
GitHub Reviewed
Published
Jan 23, 2026
in
thorsten/phpMyFAQ
•
Updated Jan 28, 2026
Description
Published to the GitHub Advisory Database
Jan 23, 2026
Reviewed
Jan 23, 2026
Published by the National Vulnerability Database
Jan 24, 2026
Last updated
Jan 28, 2026
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.
Impact
Unauthorized users can download attachments (confidentiality breach). Depending on content, this may expose sensitive documents.
References