Vulnerability record · PyPI
PYSEC-2026-3678
Description
Repo under test: https://github.com/Netflix/lemur
PUT /api/1/certificates/<id>/revoke authorizes the caller against the Lemur database row (creator == current user, or CertificatePermission over the row's roles) rather than the underlying CA-side certificate identity. Separately, POST /api/1/certificates/upload lets any user passing StrictRolePermission create a new Certificate row while freely supplying body, authority (resolved by id/name with no AuthorityPermission check) and external_id; there is no uniqueness constraint on body, serial, or external_id.
An attacker can therefore read a target certificate's public body, authority.id, and external_id via GET /certificates/<id>, upload a duplicate row, and revoke that duplicate. The creator-bypass skips CertificatePermission, the empty-endpoints check passes because the duplicate has none, and service.revoke() then revokes at the CA using the attacker-supplied body (ACME) or external_id (DigiCert/Entrust/Google CA/CFSSL) under the authority's stored CA credentials — revoking the real production certificate.
POST /api/1/certificates/upload → PUT /api/1/certificates/<dup_id>/revoke
lemur/certificates/views.py:651 — only StrictRolePermission().can() gates upload; no AuthorityPermission checklemur/certificates/schemas.py:391 — CertificateUploadInputSchema accepts caller-supplied authority and external_idlemur/schemas.py:107 — AssociatedAuthoritySchema resolves any authority by id/name with no permission checklemur/certificates/service.py:489 — upload() binds the caller-supplied…Manual fix · PyPI
pip install --upgrade "lemur>=1.9.3"Sources