A bug in Apache Airflow's Variable response masker caused nested-key redaction (triggered by secret-suffixed key names like `password`, `token`, `secret`, `api_key`) to be bypassed when the JSON value's nesting depth exceeded the shared secrets masker's recursion limit: the masker returned the original nested item before checking the sensitive key name. An authenticated UI/API user with Variable read permission could harvest plaintext secret values stored under sensitive keys nested deep enough to exceed the masker's depth cap. Affects deployments that store sensitive values inside deeply-nested JSON Variables. This is a residual gap in the fix for CVE-2026-32690 (which covered shallower nesting via `max_depth=1`); the depth-limit boundary itself was not raised, so the same key-name bypass pattern reappears beyond the recursion cap. Users who already upgraded for CVE-2026-32690 should additionally upgrade to `apache-airflow` 3.2.2 or later to cover the deep-nesting path.
Apache Airflow contains a variable masking bypass vulnerability (CVE-2026-42358) that allows authenticated users to extract plaintext secrets from deeply-nested JSON variables. The vulnerability exploits a recursion depth limit in the secret masker, enabling attackers to bypass redaction of sensitive keys like 'password', 'token', 'secret', and 'api_key' when nested beyond the masker's threshold. This is a critical data exposure risk for organizations using Airflow for workflow orchestration, particularly those storing credentials in complex JSON structures.
IMMEDIATE ACTIONS:
1. Audit all Apache Airflow deployments to identify version < 3.2.2
2. Review Variable configurations for deeply-nested JSON structures containing sensitive keys (password, token, secret, api_key, bearer, auth, credential)
3. Identify users with Variable read permissions and audit their recent access logs
4. Assume all plaintext secrets in nested JSON variables have been compromised
PATCHING GUIDANCE:
1. Upgrade Apache Airflow to version 3.2.2 or later immediately
2. If running version 3.2.1 or earlier that was patched for CVE-2026-32690, re-apply patches as this is a residual gap
3. Test upgrade in non-production environment first, validating variable masking with nested JSON test cases
4. Schedule maintenance window for production upgrade (typically 2-4 hours)
COMPENSATING CONTROLS (if immediate patching not possible):
1. Restrict Variable read permissions to minimal required users
2. Implement network-level access controls to Airflow UI/API endpoints
3. Migrate sensitive credentials from nested JSON variables to Airflow Secrets Backend (AWS Secrets Manager, HashiCorp Vault, Kubernetes Secrets)
4. Implement audit logging for all Variable access attempts
5. Disable Airflow UI access for non-essential users, enforce API token authentication
DETECTION RULES:
1. Monitor Airflow logs for Variable read operations by authenticated users
2. Alert on access to Variables containing nested JSON structures
3. Search logs for patterns: users accessing Variables with keys matching regex: (password|token|secret|api_key|bearer|auth|credential)
4. Implement WAF rules to detect suspicious Variable API queries with depth parameters
5. Monitor for bulk Variable exports or API calls requesting multiple variables in sequence
الإجراءات الفورية:
1. تدقيق جميع نشرات Apache Airflow لتحديد الإصدارات < 3.2.2
2. مراجعة تكوينات المتغيرات للبحث عن هياكل JSON المتداخلة بعمق تحتوي على مفاتيح حساسة (كلمة مرور، رمز، سر، مفتاح API)
3. تحديد المستخدمين الذين لديهم أذونات قراءة المتغيرات وتدقيق سجلات وصولهم الأخيرة
4. افترض أن جميع الأسرار النصية في متغيرات JSON المتداخلة قد تم اختراقها
إرشادات التصحيح:
1. ترقية Apache Airflow إلى الإصدار 3.2.2 أو أحدث فوراً
2. إذا كان يعمل الإصدار 3.2.1 أو أقدم الذي تم تصحيحه لـ CVE-2026-32690، أعد تطبيق التصحيحات
3. اختبر الترقية في بيئة غير الإنتاج أولاً، مع التحقق من إخفاء المتغيرات باستخدام حالات اختبار JSON متداخلة
4. جدول نافذة صيانة لترقية الإنتاج (عادة 2-4 ساعات)
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تقييد أذونات قراءة المتغيرات للمستخدمين المطلوبين بالحد الأدنى
2. تنفيذ ضوابط الوصول على مستوى الشبكة لنقاط نهاية واجهة المستخدم/API في Airflow
3. نقل بيانات الاعتماد الحساسة من متغيرات JSON المتداخلة إلى Airflow Secrets Backend
4. تنفيذ تسجيل التدقيق لجميع محاولات الوصول إلى المتغيرات
5. تعطيل وصول واجهة المستخدم في Airflow للمستخدمين غير الأساسيين
قواعد الكشف:
1. مراقبة سجلات Airflow لعمليات قراءة المتغيرات من قبل المستخدمين المصرح لهم
2. تنبيه عند الوصول إلى المتغيرات التي تحتوي على هياكل JSON متداخلة
3. البحث في السجلات عن أنماط: المستخدمون الذين يصلون إلى المتغيرات بمفاتيح تطابق التعبير العادي
4. تنفيذ قواعد WAF للكشف عن استعلامات Variable API المريبة
5. مراقبة تصدير المتغيرات بكميات كبيرة أو استدعاءات API