CVE-2026-24420
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.
如何修補 CVE-2026-24420
要修補 CVE-2026-24420,請將受影響套件升級到下列已修補版本。
- —升級至 4.0.17 或更新版本
- —升級至 4.0.17 或更新版本
CVE-2026-24420 正在被利用嗎?
低 — EPSS 為 0.4%,目前沒有觀察到大規模利用活動。
受影響套件(2)
- from 0, < 4.0.17
- from 0, < 4.0.17