CVE-2026-52771
moderateAuthenticated SQL Injection in YesWiki API Page Deletion
YesWiki versions 4.2.0 through versions before 4.6.6 contain a SQL injection (CWE-89) in ApiController::deletePage(), where a page tag read from the database is interpolated unescaped into a DELETE FROM ..._links WHERE to_tag = '$tag' query. The tag is attacker-controlled: the POST /api/pages/{tag} endpoint accepts arbitrary URL-encoded values, including single quotes, and stores them in the database. A low-privilege authenticated user can create a page whose tag is a SQL fragment, make the page non-orphaned via the standard {{include}} link mechanism, and then invoke the delete endpoint to execute arbitrary SQL inside the wiki database, including time-based blind exfiltration of data from any table. Any YesWiki deployment running an affected version that exposes the API to low-privileged accounts is affected; the flaw is rated 8.3 (high) with high confidentiality and integrity impact. No public proof-of-concept is known, EPSS is low (0.3% probability of exploitation within 30 days), and the issue is not in CISA KEV, so no confirmed exploitation is currently known.
What to do: Upgrade to YesWiki 4.6.6 or later. Where upgrading is not immediately possible, restrict API access so that low-privileged accounts cannot create pages via POST /api/pages/{tag}, and audit existing page tags for embedded quotes or SQL metacharacters. Because time-based blind exfiltration from any table is possible, review database logs for unusually long-running or unexpected queries involving the _links table.
| YesWiki | >= 4.2.0 and < 4.6.6 (fixed in 4.6.6) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
YesWiki is a wiki system written in PHP. From version 4.2.0 to before version 4.6.6, ApiController::deletePage() interpolates a page tag retrieved from the database into a DELETE FROM …_links WHERE to_tag = '$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. This issue has been patched in version 4.6.6.
- Weakness
- CWE-89
- Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L
In the news0 stories
No ingested article mentions this CVE yet.