Skip to content

Potential for "Maintainer" users to assign "Owner" roles inside their groups

Moderate
tobybellwood published GHSA-75pm-pmwq-gg2c Jul 4, 2023

Package

lagoon-core

Affected versions

< v2.15.2

Patched versions

v2.15.2

Description

Impact

Privilege Escalation via user permissions. Users in an existing group with "maintainer" permissions are permitted to add user to group - but this group addition is not limited to their permission - i.e. a user can add someone (or readd themselves) as an "owner" to the group, and benefit from any additional permissions.

Additionally, when a new group is created, a user is assigned the owner role within this new group. The permission of adding a group to a project was maintainer. This allowed users with the role of maintainer to add groups to projects, which would allow a user with maintainer to elevate their permission to owner by simply creating a new group and assigning the group to the project they are maintainer of. This has also been changed to owner role.

Patches

The permission level required to add user to a group has been set at "owner" or above in Lagoon v2.15.2
The permission level required to add groups to project has been set at "owner" or above in Lagoon v2.15.2

Workarounds

Keycloak administrators can modify the keycloak permission directly at
{Keycloak Lagoon Realm} > Clients > api > Authorization > Permissions > "Add User to Group" and select the "[Lagoon] Users role for group is Owner" policy to apply, remove the existing "maintainer" one, and save.
image

{Keycloak Lagoon Realm} > Clients > api > Authorization > Permissions > "Add Groups to Project" and select the "[Lagoon] Users role for project is Owner" policy to apply, remove the existing "maintainer" one, and save. (This permission also has a secondary policy of [Lagoon] User has access to project which should remain.

References

Are there any links users can visit to find out more?

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L

CVE ID

No known CVE

Weaknesses

Credits