Summary
Wiki.js through version 2.5.314 contains an access control flaw in page-rule matching. An authorized user with access to a folder may be able to read or modify unrelated pages when their names share a prefix with permitted content.
Affected context
The issue occurs in Wiki.js page authorization logic when folder-based permissions are evaluated against page paths or names that share prefixes. Deployments are at risk when users have authorized access to a folder and the matching logic does not distinguish the intended path from unrelated pages with similar prefixes.
Exploit preconditions
- Attack surface: Wiki.js page access and modification endpoints
- Required access: An authenticated account authorized for at least one folder or page scope
- Trigger point: Page-rule matching during read or edit authorization checks
- Why exploitation is possible: Ambiguous prefix-based matching may cause an allowed rule to apply to unrelated pages
Why this happens
The underlying bug is an authorization decision based on insufficiently precise path matching. When a page rule treats a shared name or path prefix as equivalent to the complete intended resource, authorization for one page or folder can incorrectly extend to another resource.
This maps to CWE-863: Incorrect Authorization, in which the application fails to correctly enforce access restrictions after identifying the requesting user.
Potential impact
- An authorized user may read pages outside their intended scope
- An authorized user could modify unrelated pages
- Confidential documentation or operational content may be disclosed
- Unauthorized changes could affect content integrity and user trust
- A compromised or misused account may gain broader effective access
General mitigation guidance
Mitigation generally focuses on making authorization checks resource-specific and fail-closed.
Common defensive patterns include:
- Matching complete, canonical page paths rather than ambiguous prefixes
- Separating folder-boundary checks from ordinary string comparisons
- Applying authorization checks consistently to read, edit, and related operations
- Centralizing access-control decisions to reduce inconsistent enforcement
- Reducing user and group permissions to the minimum required scope
- Treating page identifiers and routing values as untrusted input until normalized and validated
- Adding regression tests for similarly prefixed, sibling, and nested page names
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review of prefix, substring, and wildcard authorization comparisons
- Review signals involving path normalization, canonicalization, delimiter handling, and inconsistent resource identifiers
- Unit and integration tests using permitted and denied pages with shared prefixes
- Policy enforcement requiring centralized authorization checks for every resource operation
- Audit-log analysis for users accessing or modifying pages outside their normal folder scope
Automated security review tools may help identify suspicious authorization patterns, but behavior-focused tests remain important.

