Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GHSA-8f2v-2qhj-gfwg: YesWiki: Second-Order SQL Injection in Page Delete API via Unescaped Page Tag (`ApiController::deletePage`)

0
High
Published: 07/09/2026 (07/09/2026, 21:00:14 UTC)
Source: GCVE Database
Product: yeswiki/yeswiki

Description

YesWiki versions 4.2.0 through 4.6.5 contain a second-order SQL injection vulnerability in the ApiController::deletePage() method. An authenticated low-privilege user can create a page with a malicious tag containing SQL code, which is stored safely but later used unescaped in a DELETE SQL query. This allows execution of arbitrary SQL commands in the wiki database, including time-based blind data exfiltration. The vulnerability arises because the page tag is read back from the database and interpolated into a SQL query without proper escaping. Exploitation requires three steps: planting the malicious tag, making the page non-orphaned via an include directive, and invoking the delete API endpoint. No official patch information is provided.

CVSS v3.1

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

Affected software

Packagistghsa
yeswiki/yeswiki
Affected versions
>=4.2.0 <4.6.6

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/10/2026, 09:55:30 UTC

Technical Analysis

The vulnerability is a classic second-order SQL injection in YesWiki's ApiController::deletePage() method. The API accepts arbitrary page tags via POST /api/pages/{tag}, storing them with proper escaping. However, when deleting a page, the stored tag is retrieved and directly interpolated into a DELETE SQL query without escaping, allowing injection. The deletePage method checks ownership and orphan status before executing the unescaped DELETE query on the links table. This flaw enables an authenticated low-privilege user to execute arbitrary SQL commands, including time-based blind data extraction, by crafting a malicious page tag and triggering the delete endpoint. Similar unescaped usage of the tag occurs in adjacent files but the API route is the easiest exploitation vector.

Potential Impact

An authenticated low-privilege user can exploit this vulnerability to execute arbitrary SQL commands on the YesWiki database. This includes the ability to perform time-based blind SQL injection attacks to exfiltrate sensitive data from any accessible table. The vulnerability compromises confidentiality and integrity of the database and may cause partial denial of service due to injected queries. The impact is high given the ability to execute arbitrary SQL and extract data.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict access to the API delete endpoint to trusted users only, or disable the API if possible. Avoid creating pages with untrusted tags and monitor for suspicious activity. Review and update the code to properly escape or parameterize SQL queries that use user-controlled data retrieved from the database. Do not rely solely on escaping at insert time; ensure all SQL query inputs are safely handled at every usage point.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-8f2v-2qhj-gfwg
Osv Schema Version
1.4.0
Aliases
["CVE-2026-52771"]
Ecosystems
["Packagist"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a50ba7368715ace43580280

Added to database: 07/10/2026, 09:25:07 UTC

Last enriched: 07/10/2026, 09:55:30 UTC

Last updated: 07/10/2026, 09:55:30 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses