Summary
YesWiki contains a missing authorization vulnerability in the {{erasespamedcomments}} action, allowing an insufficiently authorized user to delete wiki pages selected through a submitted tag array. The risk is especially severe on fresh installations where page write access is granted to everyone by default, potentially causing permanent deletion of front pages, administrative content, and pages owned by other users.
Affected context
The vulnerability affects YesWiki installations before the security fix where the {{erasespamedcomments}} action accepts a suppr[] POST array and invokes page deletion without an effective authorization check. Exposure is greatest when the action is available to users with general page write access and the default allow-by-default ACL configuration remains unchanged.
Exploit preconditions
- Attack surface: The
{{erasespamedcomments}}wiki action and its page-deletion path - Required access: Any account or user context with page write access; on fresh installations, this may include unauthenticated or broadly authorized users depending on deployment settings
- Trigger point: Processing a POST request containing the
suppr[]array - Why exploitation is possible: The action and the deletion path do not enforce authorization for the targeted pages, allowing page deletion based on attacker-controlled input
Why this happens
The underlying flaw is an authorization enforcement failure. The action accepts a user-controlled collection of page-selection values and performs destructive operations without verifying that the requester is authorized to delete each affected page or to invoke the administrative operation itself. This maps primarily to CWE-862: Missing Authorization, with CWE-276: Incorrect Default Permissions contributing risk when write access is broadly granted by default.
Potential impact
- An attacker may permanently delete arbitrary wiki pages
- The front page, administrative pages, or other critical content could be removed
- Pages owned or maintained by other users could be deleted without consent
- Organizations could experience data loss, service disruption, and costly restoration work
- Administrative or operational information could become unavailable
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every destructive-operation boundary and reducing default trust.
Common defensive patterns include:
- Require explicit, role-based permission for spam-comment cleanup and page deletion actions
- Recheck authorization for each targeted page in the deletion service or handler
- Use deny-by-default ACLs for destructive actions and sensitive content
- Avoid treating general page write access as permission to perform administrative deletion
- Validate submitted page identifiers against the current user's authorized scope
- Add confirmation, audit logging, and recoverability controls for bulk deletion operations
- Review existing permissions and restrict broad default access where it is not required
How teams detect issues like this
Organizations can detect related authorization weaknesses through:
- Static analysis and code review checks for destructive handlers that lack permission checks
- Searches for page-deletion calls reachable from POST parameters or other user-controlled input
- Review of action ACL definitions for allow-by-default behavior
- Authorization tests covering bulk operations, resource ownership, and administrative pages
- Runtime monitoring for unusual bursts of page deletions or deletion requests from low-privilege accounts
- Policy enforcement requiring explicit authorization annotations or guards around destructive endpoints
Automated security review tools may help identify missing checks, but authorization behavior should also be validated with integration and access-control tests.

