SQL Injection Affecting yeswiki/yeswiki package, versions >=4.6.0, <4.7.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.31% (24th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-YESWIKIYESWIKI-21717106
  • published26 Oct 2026
  • disclosed25 Oct 2026
  • creditmanus-pi, manus-use, bp0lr

Introduced: 25 Oct 2026

NewCVE-2026-116207  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade yeswiki/yeswiki to version 4.7.0 or higher.

Overview

Affected versions of this package are vulnerable to SQL Injection via the query parameter in SearchManager.php, which constructs a SQL SELECT statement without validating field property names. An unauthenticated attacker can supply a malicious field identifier containing SQL expressions through the Bazar form entries API endpoint, causing those expressions to be evaluated directly by the database engine. The fix introduces a validation pattern (PROPERTY_NAME_PATTERN) that restricts field identifiers to letters, digits, underscores, and hyphens, and rejects forms containing invalid names before they reach the query builder.

PoC

A default installation contains Bazar form 2 (Agenda) with the structured map field bf_latitude and sample entries. Send the following unauthenticated request to a test instance:

GET /?api/forms/2/entries&query=bf_latitude.%22x%60%2CSLEEP%282%29%20AS%20injected_delay%2Ctag%20AS%20%60y%22%3D%3Dignored HTTP/1.1
Host: TARGET
Accept: application/json
Connection: close

Adjust the base path if YesWiki is installed below a subdirectory.

The vulnerable response is delayed by approximately two seconds per matching entry because the injected SLEEP(2) expression is evaluated inside the generated SELECT. The equivalent request without the query parameter returns normally:

GET /?api/forms/2/entries HTTP/1.1
Host: TARGET
Accept: application/json
Connection: close

The payload was validated against the unmodified SearchManager.php from YesWiki v4.6.7. In an isolated one-row MySQL fixture, the control returned in 0.001s and the request above returned in 2.001s.

Note: The PoC targets a default YesWiki installation containing Bazar form 2 (Agenda) with a structured map field and sample entries, validated against the unmodified SearchManager.php from YesWiki v4.6.7 using an isolated one-row MySQL fixture.

CVSS Base Scores

version 4.0
version 3.1