CVE-2026-70667: Lemur SSRF Protection Vulnerability
MODERATECVE-2026-70667 is a MODERATE (CVSS 6.3) ssrf protection vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Lemur libraries in the PyPI ecosystem. The issue involves ssrf protection in certificate revocation checking bypassable via http redirects and dns rebinding (incomplete fix for ghsa-54vg-pfh7-jq95). Remediation is available by upgrading affected packages to version 1.9.3.
CVE-2026-70667 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2026-70667
To remediate this vulnerability, upgrade all affected Lemur dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install lemur>=1.9.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show lemur
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-70667, inspect your installed packages using pip:
pip show lemur
Analyze the terminal output to locate any version of Lemur in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.3), your application is affected.
Note: The pip show lemur command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Lemur, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-70667 Affected Lemur Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lemur
|
PyPI |
< 1.9.3
|
1.9.3
|
References
Frequently Asked Questions
What is CVE-2026-70667?
Which Lemur versions are affected?
What version fixes CVE-2026-70667?
Is lemur affected?
What is the CVSS score of CVE-2026-70667?
What CWE is associated with CVE-2026-70667?
How can I check PyPI dependencies for CVE-2026-70667?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f3qq-49m6-rw8f",
"modified" : "2026-08-18T20:51:13Z",
"published" : "2026-08-18T20:51:12Z",
"aliases" : [ "CVE-2026-70667" ],
"summary" : "Lemur: SSRF protection in certificate revocation checking bypassable via HTTP redirects and DNS rebinding (incomplete fix for GHSA-54vg-pfh7-jq95)",
"details" : "## Summary\nThe SSRF mitigation added for GHSA-54vg-pfh7-jq95 (`_validate_revocation_url()` in `lemur\n/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.\n\n## Affected version\nTested 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`.\n\n## Bypass 1 — HTTP redirect (deterministic)\nThe guard validates only the URL in the certificate; the CRL fetch then follows redirects without re-validating the target:\n```python\n# lemur/certificates/verify.py:174\nresponse = requests.get(point, timeout=(3.05, 6)) \n```\nThe 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.\n\n## Bypass 2 — DNS rebinding / TOCTOU (probabilistic)\nThe guard resolves once during validation; the fetch re-resolves independently:\n```python\n# lemur/certificates/verify.py:51\naddr = ipaddress.ip_address(socket.gethostbyname(hostname))\n```\n\nA 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).\n\n## Relationship to GHSA-54vg-pfh7-jq95\nIncomplete-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.\n\n## Affected endpoint\n`POST /api/1/certificates/upload` (operator role) → verify_string → crl_verify / ocsp_verify. Triggered when verification runs (e.g. the check_revocation task).\n\n## PoC\n1. Generate a cert with `crlDistributionPoints = URI:http://attacker.example/crl`.\n2. That host returns `302 Location: http://169.254.169.254/latest/meta-data/...` (bypass 1), or use a low-TTL rebinding name (bypass 2).\n3. Upload via `POST /api/1/certificates/upload` as an operator user.\n4. Trigger `lemur certificate check_revocation`.\n5. Observe the request reach the internal address (`tcpdump -nni any host 169.254.169.254`).\n\n<img width=\"1140\" height=\"277\" alt=\"poc-1\" src=\"https://github.com/user-attachments/assets/f27b9584-b33a-4b9c-b812-8c60302e1892\" />\n\n## Impact\nBlind 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.\n\n## Remediation\n- `allow_redirects=False` on CRL fetches (or re-validate every redirect hop).\n- Resolve once, pin the IP, connect to the pinned address; route the OCSP URL through the same check.\n- Reject names with any internal A/AAAA record.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "lemur"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Netflix/lemur/security/advisories/GHSA-f3qq-49m6-rw8f"
}, {
"type" : "WEB",
"url" : "https://github.com/Netflix/lemur/commit/ed504a830f38a83825b1570302e9f38d6553938a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Netflix/lemur"
}, {
"type" : "WEB",
"url" : "https://github.com/Netflix/lemur/releases/tag/v1.9.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-367", "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-18T20:51:12Z",
"nvd_published_at" : null
}
}