Summary
Lemur improperly authorized certificate identifiers supplied in create, upload, and edit requests. An authenticated non-read-only user could reference certificates outside their permitted scope, suppress replacement notifications, and potentially cause certificate rotation to deploy an unauthorized certificate.
Affected context
The vulnerability occurs in Lemur deployments where certificate-management requests accept replacement certificate identifiers and resolve those objects before verifying authorization. It becomes risky when an authenticated user can submit certificate operations but is not required to own, administer, or hold an approved role for every referenced certificate.
Exploit preconditions
- Attack surface: Authenticated certificate create, upload, or edit APIs
- Required access: An authenticated account with non-read-only certificate-management capabilities
- Target condition: The request references a certificate outside the user's ownership or role scope
- Trigger point: Resolution and assignment of replacement certificate objects during request processing
- Why exploitation is possible: Referenced certificates were accepted without an object-level permission check before mutation and lifecycle state changes
Why this happens
The underlying bug is a failure to enforce authorization at the object level for identifiers supplied by the caller. Lemur resolved replacement certificate objects and assigned them to certificate relationships before confirming that the requester could access each object. The assignment triggered lifecycle behavior that disabled notifications and marked the referenced certificate as replaced, mapping to CWE-639: Authorization Bypass Through User-Controlled Key and CWE-862: Missing Authorization.
Potential impact
- An attacker may suppress certificate lifecycle notifications for certificates outside their scope
- Certificate reissue automation could be bypassed or delayed
- Certificate rotation could deploy an unauthorized certificate to affected endpoints
- Services may experience fleet-wide TLS disruption
- An attacker could cause unauthorized certificate substitution or operational outages
General mitigation guidance
Mitigation centers on enforcing object-level authorization before any referenced certificate is fetched, assigned, or mutated.
Common defensive patterns include:
- Authorizing every caller-supplied object identifier against ownership, role, and tenant scope
- Performing permission checks before relationship assignment and lifecycle side effects
- Using deny-by-default authorization for certificate-management operations
- Separating object lookup from mutation and rechecking authorization at the mutation boundary
- Limiting certificate rotation privileges and applying least privilege to automation identities
- Treating identifiers from requests as untrusted references rather than proof of access
- Adding transactional safeguards so unauthorized references cannot partially change certificate state
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis rules that flag user-controlled identifiers passed directly into privileged object lookups or relationship assignments
- Code review checks requiring authorization for every referenced object, not only the primary resource
- Tests that attempt cross-owner, cross-role, and cross-tenant certificate references
- Audit logging for certificate replacement, notification-state changes, and rotation decisions
- Policy enforcement requiring object-level authorization before mutation or lifecycle triggers
- Automated security review tools that identify missing authorization checks around indirect object references

