CVE-2026-52771: YesWiki second-order SQL injection in ApiController::deletePage

CVE-2026-52771 · Severity: high · CVSS 8.3 · Published 2026-09-05

YesWiki, a collaborative wiki platform, contains a security vulnerability that allows a logged-in user with low privileges to execute unauthorized database commands. By creating a page with a specially crafted name and then deleting it, an attacker can steal sensitive information like password hashes or delete site data. This could lead to a full takeover of the wiki or a significant disruption of service.

Technologies: yeswiki/yeswiki (Packagist), YesWiki. Vendors: Packagist, YesWiki.

Quick answers

Is CVE-2026-52771 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-52771 being exploited in the wild.
How severe is CVE-2026-52771?
High severity, with a CVSS score of 8.3, published 5 September 2026.
Which products and versions are affected?
yeswiki/yeswiki (Packagist) >= 4.2.0, < 4.6.6, ECOSYSTEM:introduced=4.2.0,fixed=4.6.6; YesWiki >= 4.2.0, < 4.6.6.
Is there a fix for CVE-2026-52771?
Yes. yeswiki/yeswiki (Packagist): upgrade to 4.6.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-52771 attacked?
It is attacked over the network, in a web application.
Am I affected by CVE-2026-52771?
Check whether you run yeswiki/yeswiki (Packagist) or YesWiki at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • yeswiki/yeswiki (Packagist): upgrade to 4.6.6 or later
    composer require yeswiki/yeswiki:^4.6.6

Technical details

A second-order SQL injection exists in `ApiController::deletePage()` and related delete handlers. While the initial `POST /api/pages/{tag}` correctly escapes input for storage, the `deletePage` method retrieves the raw tag from the database and interpolates it directly into a `DELETE FROM ..._links WHERE to_tag = '$tag'` query without re-escaping. An attacker can exploit this by creating a page with a tag containing SQL fragments (e.g., single quotes and SLEEP commands), ensuring the page is not 'orphaned' by linking to it from another page, and then calling the DELETE API. This allows for time-based blind data exfiltration or arbitrary data modification. The vulnerability is patched in version 4.6.6.

Affected products

  • YesWiki yeswiki >= 4.2.0, < 4.6.6

Identifiers

  • CVE-2026-52771
  • GHSA-8f2v-2qhj-gfwg

Timeline

  • 2026-06-02: advisory: GitHub Advisory published
  • 2026-06-02: patched: Version 4.6.6 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.