/

CVE-2026-52771

Severity:

HIGH RISK

(8.3)

SQL Injection (CWE-89) in YesWiki Page Deletion API

CVE-2026-52771

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL execution and database confidentiality, integrity, and availability compromise

Severity:

HIGH RISK

(8.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

YesWiki contains a SQL injection vulnerability in the page-deletion workflow because a stored page tag is inserted into a database query without sufficient escaping. A low-privilege authenticated user may be able to manipulate a page tag and trigger arbitrary SQL execution, including time-based extraction of information from database tables.

Affected context

The vulnerability occurs in YesWiki deployments using the affected page API and deletion workflow. It requires a page tag supplied through the application to be stored and later reused in the link-cleanup query without parameterization or equivalent safe handling. Exploitation depends on the attacker having authenticated access sufficient to create or manage pages and invoke the relevant deletion operation.

Exploit preconditions

  • Attack surface: Authenticated page-management and deletion API endpoints
  • Required access: A low-privilege account with permission to create or manage pages
  • Trigger point: Deletion of a page whose stored tag is later used in the link-cleanup query
  • Why exploitation is possible: Attacker-influenced tag data is interpolated into SQL rather than being passed as a safely bound parameter

Why this happens

The underlying bug is an unsafe construction of a SQL statement using a database value that originated from attacker-controlled input. The deletion routine incorporates the page tag directly into a query, allowing SQL syntax within that value to alter the query's intended meaning. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection.

Potential impact

  • An attacker may read sensitive records from database tables
  • An attacker could alter or delete application data
  • Database availability may be affected through resource-intensive queries
  • Time-based inference could enable blind extraction of confidential information
  • Compromised data could affect wiki content, accounts, or application configuration

General mitigation guidance

Mitigation generally focuses on ensuring that all database operations use parameterized queries or safely abstracted query-builder interfaces.

Common defensive patterns include:

  • Binding page tags as data parameters rather than concatenating them into SQL
  • Applying strict server-side validation and canonicalization to page identifiers
  • Treating values retrieved from the database as untrusted when they originated from users
  • Restricting page-management and deletion privileges according to least privilege
  • Separating database permissions so the application account has only the access it requires
  • Adding regression tests for quotes, delimiters, unexpected encodings, and other boundary inputs

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying string interpolation or concatenation in SQL statements
  • Code review checks for database queries that receive request-derived or stored user content
  • Runtime database monitoring for anomalous query structure, timing, errors, or access to unrelated tables
  • Web-application policies that alert on unusual page tags and repeated deletion requests
  • Automated security testing of API inputs and CRUD workflows, including encoded and delimiter-containing values

Sources

SourceLink
github.comgithub.com/YesWiki/yeswiki/commit/23d3cc124613b9428ab963b31807c08879a9c631
github.comgithub.com/YesWiki/yeswiki/releases/tag/v4.6.6
github.comgithub.com/YesWiki/yeswiki/security/advisories/GHSA-8f2v-2qhj-gfwg

Frequently asked

questions

Exploitation generally requires an authenticated account with sufficient permissions to create or manage pages and reach the deletion workflow. The required privilege level may vary with site configuration.

It can be triggered through the web application's API by an authorized remote user, provided the relevant endpoints are exposed and the account can perform the required page operations.

Replace SQL string construction with parameterized queries, and validate page tags using an allowlisted format appropriate for the application.

Treat all user-originated and stored content as untrusted, enforce least-privilege database access, review query-building code, and test API workflows with adversarial input.

Find out what's already
exploitable in your codebase.