All vulnerabilities

Servers and applications

CVE-2026-52771

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

Severity
High 8.3
Published
2 Jun 2026
Last changed
8 Jun 2026
Added to UpHeron
3 Nov 2026
Fixed in
4.6.6
Exploit chance
0.5% in the next 30 daysHigher than 44% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
SQL injection (CWE-89)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change data · Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L
Also known as
GHSA-8f2v-2qhj-gfwg
Sources
Project advisories (GitHub)

Description

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 is a classic second-order SQL injection: the INSERT correctly escapes the value, so the malicious tag is stored intact and the input passes every "is this value safe to put in the database?" check; the sink is the read-back-and-reuse path, where escaping is omitted.

Had the following things setup in advance:

From YesWiki/yeswiki's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
YesWikiServers and applications · github:yeswiki/yeswiki
  • From 4.2.0 before 4.6.6

About YesWiki

Free wiki-style software for building online sharing and collaboration platforms

From Wikidata, CC0 1.0.
GitHub stars
139GitHub, 15 Nov 2026
Forks
75GitHub, 15 Nov 2026
Latest release
v4.7.2GitHub, 15 Nov 2026
Released
1 Nov 2026GitHub
License
AGPL-3.0GitHub
Written in
PHPWikidata
First released
2009Wikidata
First published on GitHub
9 Sept 2009GitHub

References