CVE-2026-120698: Wiki.js: Root Administrator Takeover, TFA Bypass and Lock out.
Wiki.js is an open source wiki app built on Node.js. Prior to 2.5.315, an authenticated account with only manage:users can use users.update to change the password of any local account, including the Root administrator and other accounts with manage:system, by omitting the optional groups argument, which is automatically allowed and bypasses destination-group authorization without checking the target's current privileges. The attacker can use users.disableTFA to clear the same target's tfaIsActive state and TFA secret without a target-privilege check, then authenticate with the replacement password. Supplying groups: [] to users.update can remove every group relationship from a selected administrator and leave the installation without a legitimate account holding manage:system. Additional administrators with IDs greater than 2 can also be deactivated or deleted. This issue is fixed in version 2.5.315.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.5.315
Event History
Frequently Asked Questions
Who can exploit this issue?
An authenticated Wiki.js account that has the manage:users permission can exploit it. The account does not need manage:system privileges or authorization over the target administrator's groups.
What does an attacker need to do to take over an administrator account?
The attacker can call users.update without the optional groups argument to replace the password of a local administrator account. They can then call users.disableTFA to clear that account's TFA state and secret, allowing authentication with the new password.
Can this cause an administrative lockout rather than just account takeover?
Yes. Supplying groups: [] to users.update can remove all group relationships from a selected administrator, potentially leaving no legitimate account with manage:system. Administrators with IDs greater than 2 can also be deactivated or deleted.
Which versions are affected and what is the remediation?
Wiki.js versions prior to 2.5.315 are affected. Upgrade to version 2.5.315.