Summary
phpMyFAQ contains a broken object-level authorization flaw in the FAQ update API.
An authenticated user with the global edit_faq permission may modify a restricted FAQ by supplying its identifier, even without access to view it, potentially bypassing moderation and changing publication state.
phpMyFAQ contains a broken object-level authorization flaw in the FAQ update API.
An authenticated user with the global edit_faq permission may modify a restricted FAQ by supplying its identifier, even without access to view it, potentially bypassing moderation and changing publication state.
Affected context
The issue occurs in phpMyFAQ deployments where the PUT /api/v3.1/faq/update endpoint relies on the global edit_faq permission without checking authorization for the specific FAQ identified in the request. It affects restricted FAQ objects that the authenticated user cannot otherwise access or view.
The issue occurs in phpMyFAQ deployments where the PUT /api/v3.1/faq/update endpoint relies on the global edit_faq permission without checking authorization for the specific FAQ identified in the request. It affects restricted FAQ objects that the authenticated user cannot otherwise access or view.
Exploit preconditions
- Attack surface: The phpMyFAQ REST API, specifically the FAQ update endpoint
- Required access: An authenticated account with the global
edit_faqpermission - Trigger point: A request to update a FAQ identified by its object ID
- Why exploitation is possible: The endpoint checks a broad permission but does not enforce object-level access to the targeted FAQ
- Attack surface: The phpMyFAQ REST API, specifically the FAQ update endpoint
- Required access: An authenticated account with the global
edit_faqpermission - Trigger point: A request to update a FAQ identified by its object ID
- Why exploitation is possible: The endpoint checks a broad permission but does not enforce object-level access to the targeted FAQ
Why this happens
The underlying bug is an authorization design failure in which permission checks are applied globally rather than to the individual object being accessed. The update operation verifies that the caller may edit FAQs in general, but fails to confirm that the caller may edit the specific restricted FAQ identified by the request. This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, because a user-controlled object identifier can be used to access an unauthorized record.
The underlying bug is an authorization design failure in which permission checks are applied globally rather than to the individual object being accessed. The update operation verifies that the caller may edit FAQs in general, but fails to confirm that the caller may edit the specific restricted FAQ identified by the request. This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, because a user-controlled object identifier can be used to access an unauthorized record.
Potential impact
- Attackers may alter content in restricted FAQs
- Moderation workflows may be bypassed
- Publication or visibility states could be changed without authorization
- Untrusted users could cause misinformation or content integrity issues
- Administrative review and audit processes may be undermined
- Attackers may alter content in restricted FAQs
- Moderation workflows may be bypassed
- Publication or visibility states could be changed without authorization
- Untrusted users could cause misinformation or content integrity issues
- Administrative review and audit processes may be undermined
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the object level for every read and write operation.
Common defensive patterns include:
- Verify that the authenticated principal is authorized for the specific FAQ identifier
- Apply the same access-control policy to update, publication, and moderation state changes
- Avoid treating global edit permissions as sufficient for restricted objects
- Use centralized, deny-by-default authorization checks
- Limit privileged permissions and separate content editing from publication authority
- Log and review changes to restricted FAQs and publication states
Mitigation generally focuses on enforcing authorization at the object level for every read and write operation.
Common defensive patterns include:
- Verify that the authenticated principal is authorized for the specific FAQ identifier
- Apply the same access-control policy to update, publication, and moderation state changes
- Avoid treating global edit permissions as sufficient for restricted objects
- Use centralized, deny-by-default authorization checks
- Limit privileged permissions and separate content editing from publication authority
- Log and review changes to restricted FAQs and publication states
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis and code review checks for object lookups that precede authorization checks
- Review of API handlers that accept user-controlled IDs for records or resources
- Tests that attempt cross-tenant, cross-role, and restricted-object updates
- Policy enforcement requiring resource-level authorization on every modifying endpoint
- Monitoring for unusual updates to restricted FAQs or publication-state transitions
- Automated application security testing that compares access decisions across object identifiers
Organizations can look for this weakness through:
- Static analysis and code review checks for object lookups that precede authorization checks
- Review of API handlers that accept user-controlled IDs for records or resources
- Tests that attempt cross-tenant, cross-role, and restricted-object updates
- Policy enforcement requiring resource-level authorization on every modifying endpoint
- Monitoring for unusual updates to restricted FAQs or publication-state transitions
- Automated application security testing that compares access decisions across object identifiers

