Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

PYSEC-2026-3676

MediumCVSS 6.3 / 10
Published Aug 19, 2026·Last modified Aug 19, 2026
Affected Components(1)
PyPI logolemur
< 1.9.3
Description

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

  1. Generate a cert with crlDistributionPoints = URI:http://attacker.example/crl.
  2. That host returns 302 Location: http://169.254.169.254/latest/meta-data/... (bypass 1), or use a low-TTL rebinding name (bypass 2).
  3. Upload via POST /api/1/certificates/upload as an operator user.
  4. Trigger lemur certificate check_revocation.
  5. Observe the request reach the internal address (tcpdump -nni any host 169.254.169.254).
<img width="1140" height="277" alt="poc-1" src="https://github.com/user-attachments/assets/f27b9584-b33a-4b9c-b812-8c60302e1892" />

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=False on 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.
Risk Scores
Base Score
6.3

The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a low impact on the confidentiality of the information. There is a low impact on the integrity of the data. There is a low impact on the availability of the system.

Threat Intelligence
5.8

Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.

EPSS
0.14%

The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Browse More

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard