6.3medium
Lemur: SSRF protection in certificate revocation checking bypassable via HTTP redirects and DNS rebinding (incomplete fix for CVE-2026-55162)
- Severity
- 6.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.17% (higher than 6% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-f3qq-49m6-rw8fPYSEC-2026-3676
Description
Lemur manages TLS certificate creation. Prior to 1.9.3, _validate_revocation_url in lemur/certificates/verify.py checked the original CRL or OCSP URL but the later request could reach a different destination. The CRL requests.get call followed HTTP redirects without validating each Location target, so a public attacker-controlled URL could redirect to loopback, RFC1918, link-local, or instance-metadata addresses. Validation and connection also performed separate DNS resolutions, creating a time-of-check time-of-use window for DNS rebinding on both CRL and OCSP paths. An operator uploading a certificate through POST /api/1/certificates/upload could therefore induce blind internal requests despite the earlier mitigation. The fix disables redirects and pins validated addresses while preserving the correct Host value. 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 | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| PyPA Advisory Database | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
Classification
What each source says
CVE List
Lemur manages TLS certificate creation. Prior to 1.9.3, _validate_revocation_url in lemur/certificates/verify.py checked the original CRL or OCSP URL but the later request could reach a different destination. The CRL requests.get call followed HTTP redirects without validating each Location target, so a public attacker-controlled URL could redirect to loopback, RFC1918, link-local, or instance-metadata addresses. Validation and connection also performed separate DNS resolutions, creating a time-of-check time-of-use window for DNS rebinding on both CRL and OCSP paths. An operator uploading a certificate through POST /api/1/certificates/upload could therefore induce blind internal requests despite the earlier mitigation. The fix disables redirects and pins validated addresses while preserving the correct Host value. This issue is fixed in version 1.9.3.
GitHub Advisory Database
Summary
The SSRF mitigation added for GHSA-54vg-pfh7-jq95 (_validate_revocation_url() in lemur /certificates/verify.py) can be bypassed. An operator-role user who uploads a certificate with attacker-controlled CRL/OCSP extensions can still make Lemur reach internal destinations (RFC1918, loopback, link-local 169.254.169.254) during verification.
Affected version
Tested against main (the commit that introduced _validate_revocation_url). The 1.9.2 release predates that guard and is vulnerable to the original SSRF (GHSA-54vg-pfh7-jq95) directly; this bypass applies to the unreleased mitigation in main. Please map the affected range to whichever release will first contain _validate_revocation_url.
Bypass 1 — HTTP redirect (deterministic)
The guard validates only the URL in the certificate; the CRL fetch then follows redirects without re-validating the target:
# lemur/certificates/verify.py:174
response = requests.get(point, timeout=(3.05, 6))
The attacker hosts the CRL URL on a public host they control (passes the guard); that host returns 302 Location: http://169.254.169.254/.... requests follows it to the internal target the guard never inspected.
Bypass 2 — DNS rebinding / TOCTOU (probabilistic)
The guard resolves once during validation; the fetch re-resolves independently:
# lemur/certificates/verify.py:51
addr = ipaddress.ip_address(socket.gethostbyname(hostname))
A low-TTL attacker name that answers a public IP at check time and an internal IP at fetch time passes the guard but is fetched internally. Same gap affects the OCSP path (openssl ocsp -url <url>, verify.py:90-99).
Relationship to GHSA-54vg-pfh7-jq95
Incomplete-fix of that mitigation, not a duplicate. Bypass 1 is not mentioned there; bypass 2 is the rebinding gap that advisory's remediation text anticipated ("pins the resolved IP") but the code does not implement.
Affected endpoint
POST /api/1/certificates/upload (operator role) → verify_string → crl_verify / ocsp_verify. Triggered when verification runs (e.g. the check_revocation task).
PoC
- Generate a cert with
crlDistributionPoints = URI:http://attacker.example/crl. - That host returns
302 Location: http://169.254.169.254/latest/meta-data/...(bypass 1), or use a low-TTL rebinding name (bypass 2). - Upload via
POST /api/1/certificates/uploadas an operator user. - Trigger
lemur certificate check_revocation. - Observe the request reach the internal address (
tcpdump -nni any host 169.254.169.254).
Impact
Blind SSRF from the Lemur host: reach internal services and instance metadata (169.254.169.254 without IMDSv2). Response is parsed as a CRL and discarded — reachability/side-effects, not response exfiltration.
Remediation
allow_redirects=Falseon CRL fetches (or re-validate every redirect hop).- Resolve once, pin the IP, connect to the pinned address; route the OCSP URL through the same check.
- Reject names with any internal A/AAAA record.
NVD (es)
Lemur gestiona la creación de certificados TLS. Antes de la versión 1.9.3, _validate_revocation_url en lemur/certificates/verify.py verificaba la URL original de CRL u OCSP, pero la solicitud posterior podría alcanzar un destino diferente. La llamada requests.get de CRL seguía redirecciones HTTP sin validar cada objetivo de Location, por lo que una URL pública controlada por un atacante podría redirigir a direcciones de loopback, RFC1918, link-local o de metadatos de instancia. La validación y la conexión también realizaban resoluciones DNS separadas, creando una ventana de tiempo de verificación y tiempo de uso para el DNS rebinding en ambas rutas CRL y OCSP. Un operador que subía un certificado a través de POST /api/1/certificates/upload podría, por lo tanto, inducir solicitudes internas ciegas a pesar de la mitigación anterior. La solución deshabilita las redirecciones y fija direcciones validadas mientras preserva el valor correcto de Host. Este problema está solucionado en la versión 1.9.3.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-70667 changed 2026-08-19 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-f3qq-49m6-rw8f changed 2026-08-20 | CC-BY-4.0 |
| NVD | CVE-2026-70667 changed 2026-10-22 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3676 changed 2026-08-19 | CC-BY-4.0 |