/

CVE-2026-52766

Severity:

CRITICAL RISK

(9.1)

Missing Authorization (CWE-862) in YesWiki Erase Action

CVE-2026-52766

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-276, CWE-862

Impact:

Unauthorized permanent deletion of wiki content

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/YesWiki/yeswiki/commit/ed5b548a705c8091ba0282aaaba73ddda976abef
github.comgithub.com/YesWiki/yeswiki/releases/tag/v4.6.6
github.comgithub.com/YesWiki/yeswiki/security/advisories/GHSA-6x7x-gcmf-7r8x

Frequently asked

questions

Any user who can reach the vulnerable action with sufficient page write access may be able to trigger unauthorized deletion. On installations using broad default permissions, this scope may include users who were not intended to have administrative capabilities.

No direct server or filesystem access is generally required. The relevant prerequisite is access to the vulnerable wiki action and a permission configuration that permits the request to reach it.

Enforce explicit authorization before invoking the action and again before deleting each page, using role-, ownership-, and resource-level checks rather than relying on general write access.

Use deny-by-default permissions for destructive functionality, test every action under multiple privilege levels, audit bulk-operation paths, and monitor deletion activity with reliable audit logs.

Find out what's already
exploitable in your codebase.