/

CVE-2026-104456

Severity:

HIGH RISK

(7.6)

SQL Injection (CWE-89) in YesWiki ACL Access Service

CVE-2026-104456

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database Disclosure and Read-Access Control Bypass

Severity:

HIGH RISK

(7.6)

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 contains a second-order SQL injection vulnerability in its ACL update logic, where a previously stored username is later incorporated into a database query without adequate escaping. An attacker who can register a crafted account name may cause SQL manipulation when accessing non-administrative ACL-filtered listings, potentially exposing database contents and bypassing read restrictions.

Affected context

The vulnerability occurs in YesWiki deployments where self-registration is enabled and account names are stored without sufficient normalization or validation. Risk arises when the stored username is subsequently reused by AclService::updateRequestWithACL while constructing a read-ACL LIKE clause for filtered listings. The issue affects deployments using the vulnerable ACL processing behavior before the fixed release boundary.

Exploit preconditions

  • Attack surface: Self-registration and ACL-filtered listing functionality
  • Required access: Ability to create a user account, subject to any registration controls
  • Trigger point: Loading a non-administrative listing that invokes read-ACL query construction
  • Why exploitation is possible: A stored account name is later concatenated into a SQL expression without adequate parameterization or escaping, enabling second-order query manipulation

Why this happens

The underlying defect is an SQL injection flaw caused by treating persisted user-controlled data as trusted query syntax. A username accepted during account creation is stored and later concatenated into a read-ACL LIKE clause instead of being safely bound as a query parameter or handled through a strictly constrained query-building interface. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') and represents a second-order injection pattern.

Potential impact

  • An attacker may read database contents beyond intended ACL boundaries
  • Read-access restrictions may be bypassed for affected listings
  • Sensitive application or user data could be disclosed
  • Database integrity could be affected if the execution context permits additional query operations
  • Further compromise could be possible depending on database privileges and exposed data

General mitigation guidance

Mitigation generally focuses on ensuring that persisted user-controlled values remain data throughout their entire lifecycle.

Common defensive patterns include:

  • Use parameterized queries or safely bound query-builder parameters for all ACL conditions
  • Avoid constructing SQL fragments through string concatenation
  • Apply allowlist validation and canonicalization to account names according to application requirements
  • Enforce strict schemas and length limits for identity fields
  • Separate authorization decisions from dynamically assembled SQL expressions where practical
  • Run the application database account with the minimum privileges required
  • Review existing stored identities and other persisted inputs for unsafe reuse in query construction

How teams detect issues like this

Organizations can look for this vulnerability class through:

  • Static analysis rules that flag string concatenation or interpolation within SQL statements
  • Code review checks for persisted input flowing into query-building functions
  • Tests using adversarial identity values against ACL-filtered views, without relying on production data
  • Database monitoring for unexpected query shapes, anomalous LIKE predicates, and access to records outside normal authorization patterns
  • Policy enforcement requiring parameterized queries in application data-access layers
  • Automated security review tools that track tainted data from registration or profile fields into database APIs

Sources

SourceLink
github.comgithub.com/YesWiki/yeswiki/security/advisories/GHSA-6rw5-62xf-q5xp
vulncheck.comvulncheck.com/advisories/yeswiki-before-4.6.7-second-order-sql-injection-via-acl-username

Frequently asked

questions

It may be exploitable through normal web functionality when self-registration and the affected ACL-filtered listings are available. The practical scope depends on deployment configuration and database permissions.

The attacker generally needs the ability to create or control an account name that is later stored and processed by the ACL service. Administrative access is not inherently required.

Treat stored usernames as untrusted input and use parameterized database queries or safe query-builder bindings for every subsequent use.

Combine input validation, taint-aware code review, parameterized-query policies, authorization testing, and least-privilege database accounts. Also review persisted values, since second-order injection may occur long after data is initially accepted.

Find out what's already
exploitable in your codebase.