/

CVE-2026-52770

Severity:

HIGH RISK

(7.5)

SQL Injection (CWE-89) in YesWiki Bazar Listing APIs

CVE-2026-52770

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database information disclosure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

YesWiki's public Bazar entry-listing APIs contain an unauthenticated SQL injection vulnerability in numeric query filters. An attacker may inject boolean SQL expressions and infer database contents based on whether matching entries are returned.

Affected context

The issue occurs in YesWiki's public Bazar entry-listing APIs when filters are applied to fields whose values are represented numerically. The risk exists where attacker-controlled filter values are inserted into SQL without being enclosed in quotes or subjected to strict numeric validation.

Exploit preconditions

  • Attack surface: Public Bazar entry-listing API endpoints
  • Required access: No authentication is generally required
  • Trigger point: Processing of numeric query or queries filters
  • Why exploitation is possible: The filter value is escaped but remains unquoted and is not constrained to a valid numeric format, allowing SQL expressions to influence query results

Why this happens

The vulnerability results from treating an attacker-controlled filter as a numeric SQL fragment without enforcing its intended data type. Escaping alone does not safely constrain values that are inserted into dynamically constructed SQL, allowing boolean expressions to alter query behavior. This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection.

Potential impact

  • An attacker may infer sensitive database contents
  • Query results could be manipulated or selectively exposed
  • Confidential wiki or application data could be disclosed
  • Database availability or integrity could be affected depending on query capabilities

General mitigation guidance

Mitigation generally focuses on removing attacker-controlled SQL construction and reducing trust in request parameters.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for every filter value
  • Validate numeric inputs with strict type and range checks before query construction
  • Avoid relying on escaping as a substitute for parameter binding
  • Apply allowlisted field names and filter operators at the API boundary
  • Run the application database account with only the permissions required by the application
  • Return consistent responses that minimize inference through result differences

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules for string concatenation or interpolation in SQL statements
  • Code review checks for numeric parameters that are escaped but not type-validated
  • Dynamic testing of public filters using boolean-condition variations and response comparison
  • Database monitoring for anomalous predicates and unexpected query patterns
  • Policy enforcement requiring prepared statements for application-generated SQL

Automated security review tools may help flag unsafe query construction, but findings should be validated against the actual data-access layer.

Sources

SourceLink
github.comgithub.com/YesWiki/yeswiki/commit/f3b0dd093a7ace47dc29a515faeb02635baceae2
github.comgithub.com/YesWiki/yeswiki/releases/tag/v4.6.6
github.comgithub.com/YesWiki/yeswiki/security/advisories/GHSA-qg78-vmvc-fhjw

Frequently asked

questions

Yes. The affected Bazar listing APIs are public, so exploitation may be possible through network requests without a user session when the vulnerable filters are exposed.

Generally, no authentication is required. The key condition is that the deployment exposes a vulnerable public entry-listing endpoint.

Use parameterized SQL queries and enforce strict numeric type validation before values reach the database layer.

Standardize prepared statements, allowlist filter fields and operators, review dynamic query code, limit database privileges, and test public APIs for response-based data inference.

Find out what's already
exploitable in your codebase.