7.3high
Lemur: Any user can revoke arbitrary certificates at the CA by uploading a duplicate record and revoking it
- Severity
- 7.3high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.12% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-pxmc-2ffp-8j67PYSEC-2026-3678
Description
Lemur manages TLS certificate creation. Prior to 1.9.3, POST /api/1/certificates/upload allowed a non-read-only user to create a duplicate row using another certificate body, authority_id, serial, or external_id without requiring permission on the underlying authority. PUT /api/1/certificates//revoke authorized the caller against only the selected Lemur row, so the creator of the duplicate bypassed CertificatePermission. The duplicate had no cert.endpoints, which also bypassed the safeguard that prevents revocation of deployed certificates. Issuer plugins then revoked the real CA-side certificate using certificate.body or external_id under the stored authority credentials. An attacker could therefore revoke arbitrary managed certificates and cause fleet-wide TLS denial of service. The fix rejects duplicate authority_id and serial identities, requires authority access on upload, and checks every matching row during revocation. This issue is fixed in version 1.9.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Netflix lemur | < 1.9.3 | CVE List |
| lemur (PyPI) | before 1.9.3 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H |
| GitHub | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H |
| PyPA Advisory Database | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Lemur manages TLS certificate creation. Prior to 1.9.3, POST /api/1/certificates/upload allowed a non-read-only user to create a duplicate row using another certificate body, authority_id, serial, or external_id without requiring permission on the underlying authority. PUT /api/1/certificates//revoke authorized the caller against only the selected Lemur row, so the creator of the duplicate bypassed CertificatePermission. The duplicate had no cert.endpoints, which also bypassed the safeguard that prevents revocation of deployed certificates. Issuer plugins then revoked the real CA-side certificate using certificate.body or external_id under the stored authority credentials. An attacker could therefore revoke arbitrary managed certificates and cause fleet-wide TLS denial of service. The fix rejects duplicate authority_id and serial identities, requires authority access on upload, and checks every matching row during revocation. This issue is fixed in version 1.9.3.
GitHub Advisory Database
Summary
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.
Affected route
POST /api/1/certificates/upload → PUT /api/1/certificates/<dup_id>/revoke
Affected code
lemur/certificates/views.py:651— onlyStrictRolePermission().can()gates upload; noAuthorityPermissionchecklemur/certificates/schemas.py:391—CertificateUploadInputSchemaaccepts caller-suppliedauthorityandexternal_idlemur/schemas.py:107—AssociatedAuthoritySchemaresolves any authority by id/name with no permission checklemur/certificates/service.py:489—upload()binds the caller-supplied authority onto the new rowlemur/certificates/models.py:119— onlynameis unique;body/serial/external_idare not, andget_or_increase_name()auto-suffixes on collisionlemur/certificates/views.py:1677—if g.current_user != cert.user: ... CertificatePermission ...— creator of the duplicate row bypasses the owner checklemur/certificates/views.py:1687—if cert.endpoints: ...— duplicate row has no endpoints, so the deployed-cert safeguard is bypassedlemur/certificates/service.py:1120—plugin = plugins.get(certificate.authority.plugin_name); plugin.revoke_certificate(certificate, reason)lemur/plugins/lemur_acme/acme_handlers.py:268— ACME revokes bycertificate.bodylemur/plugins/lemur_digicert/plugin.py:477,lemur/plugins/lemur_entrust/plugin.py:321— commercial CAs revoke bycertificate.external_idlemur/certificates/schemas.py:290—CertificateOutputSchemaexposesexternal_id,body,authorityto any authenticated user
Impact
A low-privileged authenticated insider (or holder of a stolen non-admin token/API key) can revoke any certificate managed by Lemur — including high-value certificates they do not own and certificates currently attached to live endpoints — directly at the issuing CA. Iterating over GET /certificates yields fleet-wide revocation (mass DoS of TLS endpoints) without ever passing an AuthorityPermission or CertificatePermission check on the victim certificate. This is exactly the "Revocation as DoS vector" scenario flagged in the threat model and additionally defeats the built-in "cannot revoke while attached to endpoint" safeguard.
Root cause
Revocation authority is bound to ownership of the Lemur DB row, not to the CA-side certificate identity. Because upload allows creating a second row that aliases the same CA-side certificate (same body / external_id / authority) without any uniqueness constraint or AuthorityPermission check, the attacker can manufacture a row they own and then exercise the creator-bypass on revoke. The endpoint-attached guard inspects only the duplicate row's cert.endpoints, which is empty.
Validated evidence
Static path trace, confirmed by code inspection (validation status: CONFIRMED):
- Upload is gated only by
StrictRolePermission(default-open to any non-read-only user) and accepts attacker-chosenauthority+external_id+bodywithout anAuthorityPermissioncheck. Certificate.body/external_idhave no uniqueness constraint, so a duplicate row is created.- The revoke endpoint short-circuits the owner check when caller is the row creator, and the endpoint-attached guard inspects only the duplicate row.
- Issuer plugins revoke at the CA using
body/external_idtaken from the duplicate row under the authority's stored CA credentials.
Proof of concept / reproducer
Status: reconstructed from source report (static control-flow trace; not executed against a live CA — revoking at a real CA is destructive).
Preconditions: attacker is an authenticated Lemur user holding any role other than read-only. <VICTIM_CERT_ID> is any certificate id readable via GET /api/1/certificates.
# 1. Read the victim's body / authority / external_id (exposed to any authenticated user)
curl -sS "<TARGET_BASE_URL>/api/1/certificates/<VICTIM_CERT_ID>" \
-H "Authorization: Bearer <AUTH_TOKEN>" \
| jq '{body, external_id, authority: .authority.id}'
# 2. Upload a duplicate row aliasing the same CA-side certificate
curl -sS -X POST "<TARGET_BASE_URL>/api/1/certificates/upload" \
-H "Authorization: Bearer <AUTH_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "victim-dup",
"owner": "attacker@example.com",
"body": "<VICTIM_BODY_PEM>",
"authority": {"id": <VICTIM_AUTHORITY_ID>},
"externalId": "<VICTIM_EXTERNAL_ID>"
}'
# → returns {"id": <DUP_ID>, ...}; attacker is now cert.user of <DUP_ID>
# 3. Revoke the duplicate — issuer plugin revokes at the CA by body/external_id
curl -sS -X PUT "<TARGET_BASE_URL>/api/1/certificates/<DUP_ID>/revoke" \
-H "Authorization: Bearer <AUTH_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"crlReason": "unspecified"}'
Static-trace validation command from the source report:
grep -n 'StrictRolePermission' lemur/certificates/views.py | grep -v Authority
grep -n 'cert.authority = kwargs.get' lemur/certificates/service.py
grep -n 'g.current_user != cert.user' lemur/certificates/views.py
grep -n 'certificate.external_id\|certificate.body' \
lemur/plugins/lemur_acme/acme_handlers.py \
lemur/plugins/lemur_digicert/plugin.py \
lemur/plugins/lemur_entrust/plugin.py
Source artifact: audit/harnesses/public-repo-threat-model-harness/results/netflix-lemur-100run-mythos-20260627T051129Z/findings.jsonl (run_050, finding cluster lemur-revoke-via-duplicate, 2/100 runs).
Suggested fix
Decouple CA-side revocation authority from Lemur row ownership:
- On
POST /certificates/upload, ifauthorityis supplied enforceAuthorityPermissionfor that authority, and reject/ignore caller-suppliedexternal_id. - Before calling
plugin.revoke_certificate, look up allCertificaterows sharing the same(authority_id, serial)orbodyand requireCertificatePermissionon every match (and run the endpoint-attached check against all matches). - Consider a DB uniqueness constraint or dedup on
(authority_id, serial)so a second row for the same CA-issued certificate cannot be created. - Stop exposing
external_idinCertificateOutputSchemato non-owners.
NVD (es)
Lemur gestiona la creación de certificados TLS. Antes de la versión 1.9.3, POST /API/1/certificates/upload permitía a un usuario no de solo lectura crear una fila duplicada utilizando otro cuerpo de certificado, authority_id, serial o external_id sin requerir permiso sobre la autoridad subyacente. PUT /API/1/certificates//revoke autorizaba al llamante solo contra la fila de Lemur seleccionada, por lo que el creador del duplicado eludía CertificatePermission. El duplicado no tenía cert.endpoints, lo que también eludía la salvaguarda que impide la revocación de certificados desplegados. Los plugins de emisor luego revocaban el certificado real del lado de la CA utilizando certificate.body o external_id bajo las credenciales de autoridad almacenadas. Un atacante podría, por lo tanto, revocar certificados gestionados arbitrarios y causar una denegación de servicio TLS en toda la flota. La solución rechaza identidades duplicadas de authority_id y serial, requiere acceso de autoridad en la carga y verifica cada fila coincidente durante la revocación. Este problema está solucionado en la versión 1.9.3.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-71417 changed 2026-08-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-pxmc-2ffp-8j67 changed 2026-08-19 | CC-BY-4.0 |
| NVD | CVE-2026-71417 changed 2026-10-22 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3678 changed 2026-08-19 | CC-BY-4.0 |