Summary
Kalmia has a privilege escalation vulnerability in its user-edit endpoint that may let an authenticated, low-privileged user change accounts they should not be able to manage. A user with only read permission could potentially grant themselves administrative permissions or reset an administrator's password, leading to account or instance takeover.
Affected context
The issue affects Kalmia through version 0.2.0 and is associated with the /kal-api/auth/user/edit endpoint. It becomes risky when the endpoint allows a low-privileged authenticated user to change sensitive account attributes or modify another user's account without adequate authorization checks.
Exploit preconditions
- Attack surface: The
/kal-api/auth/user/editAPI endpoint - Required access: An authenticated account with low-level access, including read permission
- Trigger point: A request that edits account details or permissions
- Why exploitation is possible: The endpoint may not sufficiently restrict which accounts or sensitive fields the caller is authorized to modify
Why this happens
This is an improper privilege management issue mapped to CWE-269. The underlying pattern is allowing an authenticated user to perform account or permission changes beyond their intended authority, such as changing administrative flags, broad permissions, or another user's credentials. Authorization should be enforced for each operation and protected field, not inferred from authentication or general endpoint access.
Potential impact
- A low-privileged user could grant themselves administrative access
- An attacker could reset an administrator's password and take over that account
- Unauthorized changes could compromise the Kalmia instance and its data
- A compromised account could be used for further actions within the application
General mitigation guidance
Common defensive patterns include:
- Enforcing server-side authorization for every account edit and target account
- Allowing only explicitly permitted fields to be updated by each role
- Keeping administrative flags, broad permissions, and credential changes out of general-purpose profile updates
- Applying least-privilege defaults and separating read access from account-management capabilities
- Requiring appropriate authorization checks for sensitive actions, regardless of the user interface
How teams detect issues like this
Review account-edit handlers for missing object-level authorization and for user-controlled updates to role, permission, or credential fields. Static analysis and code review can look for mass-assignment patterns, broad update operations, and authorization checks that occur only at the route or authentication layer. Policies and tests can verify that read-only users cannot edit accounts or sensitive fields, including those belonging to administrators.

