BuzzPHP
LightDarkSystem

YesWiki: Second-Order SQL Injection in Page Delete API via Unescaped Page Tag (`ApiController::deletePage`)

High severity. Published 9 July 2026. Update yeswiki/yeswiki to 4.6.6 or later: composer update yeswiki/yeswiki.

Which versions are affected?

PackageAffected versionsFixed in
yeswiki/yeswiki (opens in a new tab)>= 4.2.0, < 4.6.64.6.6

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show yeswiki/yeswiki
composer audit

Advisory details

SeverityHighCVSS 8.3
Published
Updated
CVECVE-2026-52771 (opens in a new tab)
GHSAGHSA-8f2v-2qhj-gfwg (opens in a new tab)
WeaknessCWE-89

What the advisory says

Summary ApiController::deletePage() interpolates a page tag retrieved from the database into a DELETE FROM …links WHERE totag = '$tag' query without escaping. The page tag is attacker-controlled — the POST /api/pages/{tag} API accepts arbitrary URL-encoded values, including single quotes, and stores them. A low-privilege authenticated user can therefore create a page whose tag is a SQL fragment, make the page non-orphaned via the standard {{include page="…"}} link mechanism, and then invoke the delete endpoint to execute arbitrary SQL inside the wiki database - including time-based blind data exfiltration from any table.

Source: GHSA-8f2v-2qhj-gfwg (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories