Wekan Authentication Bypass – Exploiting Common Pitfalls of MeteorJS
The setEmail Meteor method in Wekan lacked authorization checks, allowing an unauthenticated attacker who knew a victim's userId to change that user's email address. The attacker could then use the standard password reset flow to take over the account.
offensive-security.com
Published on offensive-security.com
In this post, Dejan walks us through an authentication bypass vulnerability discovered in Wekan and reported by Offensive Security.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The setEmail Meteor method trusted a client-supplied userId and performed no check that the caller was that user or an administrator.
Impact
An unauthenticated attacker could take over any Wekan account, including an administrator's, by changing its email and resetting the password.
What the attacker needed
Victim's userId known; no authentication needed
The fix
The setEmail method should verify that the caller is the user being modified or an administrator before updating the email; the text says the issue was fixed in version 3.81.
How it was found
- Obtain the victim's userId, for example by querying the Users collection from a public board page.
- Call the setEmail Meteor method from the browser console with a new email address and the victim's userId.
- Request a password reset for the new email address and receive the reset link.
- Follow the reset link, set a new password, and log in as the victim.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Wekan is a kanban board app built on Meteor, a JavaScript framework. A server-side function called setEmail was meant to let a user change their own email, but it never checked who was calling it. Anyone who knew another user's ID could change that user's email, then request a password reset to that new address and log in as them.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.