thorsten/phpmyfaq: Category-restricted editors can modify attachments outside their allowed categories
What fixes it
- 4.2.0-betathorsten/phpmyfaq, composerGitHub
composer require "thorsten/phpmyfaq:^4.2.0-beta"
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
Summary
In medium permission mode, attachment administration endpoints check global attachment permissions but do not enforce the category restrictions of the parent FAQ.
A restricted editor can list, upload, and delete attachments belonging to FAQs outside the categories assigned to their group.
Details
The upload endpoint accepts a user-controlled record_id and record_lang, while deletion accepts an attachment ID. These operations only check addattachment or delattachment; they do not resolve the parent FAQ and verify its category.
This differs from GHSA-jmv9-23mw-mxpq, which covered unauthenticated metadata disclosure in 4.1.6. This report demonstrates authenticated cross-category modification.
PoC
- Enable medium permission mode.
- Give a test group
edit_faq,addattachment, anddelattachment, restricted to category A. - Create a target FAQ in category B.
- Confirm that the user receives
403when opening the target FAQ's edit page. - Send an authenticated upload request with a valid CSRF token and the target FAQ's
record_id. - Observe
200 OKand a new attachment on the unauthorized FAQ. - Send a delete request for that attachment ID.
- Observe
200 OKand that the attachment is removed.
Impact
A category-restricted editor can tamper with or delete files belonging to FAQs outside their authorization scope. This can cause unauthorized content changes, loss of attachments, and partial service disruption.
Text from GitHub Advisory Database
Affected versions 1
- thorsten/phpmyfaq, composer4.2.0-alpha.2GitHub