Default configurations of Apache Shiro send sensitive cookies in HTTPS session without 'Secure' attribute.
This issue affects Apache Shiro from 1.0 to 2.1.0, and 3.0.0-alpha-1.
Users are recommended to upgrade to version 2.1.1, or 3.0.0-alpha-2 or later, which fixes the issue.
In the affected versions, Shiro-native session manager, as well as Remember-Me manager sends JSESSIONID and rememberMe cookies without 'secure' attribute by default.
Apache Shiro versions 1.0 through 2.1.0 and 3.0.0-alpha-1 fail to set the 'Secure' attribute on session cookies (JSESSIONID and rememberMe), allowing potential interception over unencrypted connections. This cookie security misconfiguration could enable attackers to capture sensitive session tokens if HTTPS is downgraded or compromised. While CVSS is moderate (6.5), the vulnerability affects authentication mechanisms critical to enterprise applications deployed across Saudi organizations.
IMMEDIATE ACTIONS:
1. Identify all Apache Shiro deployments in your environment (versions 1.0-2.1.0, 3.0.0-alpha-1)
2. Audit current cookie configurations for JSESSIONID and rememberMe attributes
3. Review access logs for potential cookie interception attempts
PATCHING GUIDANCE:
1. Upgrade to Apache Shiro 2.1.1 or 3.0.0-alpha-2 or later immediately
2. For applications unable to patch immediately, implement manual configuration:
- Set 'secure' attribute to 'true' in session manager configuration
- Configure: sessionManager.sessionIdCookie.secure = true
- Configure: rememberMeManager.cookie.secure = true
3. Ensure HTTPS is enforced site-wide with HSTS headers
COMPENSATING CONTROLS (if patching delayed):
1. Implement HTTP Strict-Transport-Security (HSTS) headers with max-age minimum 31536000
2. Deploy WAF rules to enforce HTTPS-only cookie transmission
3. Monitor for cookie exfiltration in network traffic
4. Implement certificate pinning for critical applications
5. Use secure proxy/load balancer to enforce cookie security attributes
DETECTION RULES:
1. Monitor for JSESSIONID/rememberMe cookies transmitted over HTTP
2. Alert on Set-Cookie headers lacking 'Secure' attribute in responses
3. Track authentication failures following suspicious cookie activity
4. Log all Shiro configuration changes
الإجراءات الفورية:
1. تحديد جميع نشرات Apache Shiro في بيئتك (الإصدارات 1.0-2.1.0، 3.0.0-alpha-1)
2. تدقيق تكوينات ملفات تعريف الارتباط الحالية لخصائص JSESSIONID و rememberMe
3. مراجعة سجلات الوصول للكشف عن محاولات اعتراض ملفات تعريف الارتباط المحتملة
إرشادات التصحيح:
1. الترقية إلى Apache Shiro 2.1.1 أو 3.0.0-alpha-2 أو إصدار أحدث فوراً
2. للتطبيقات غير القادرة على التصحيح فوراً، تنفيذ التكوين اليدوي:
- تعيين خاصية 'secure' إلى 'true' في تكوين مدير الجلسة
- التكوين: sessionManager.sessionIdCookie.secure = true
- التكوين: rememberMeManager.cookie.secure = true
3. التأكد من فرض HTTPS في جميع أنحاء الموقع مع رؤوس HSTS
الضوابط البديلة (إذا تأخر التصحيح):
1. تنفيذ رؤوس HTTP Strict-Transport-Security (HSTS) بحد أدنى max-age 31536000
2. نشر قواعد WAF لفرض نقل ملفات تعريف الارتباط الآمنة فقط
3. مراقبة تسرب ملفات تعريف الارتباط في حركة المرور
4. تنفيذ تثبيت الشهادات للتطبيقات الحرجة
5. استخدام وكيل آمن/موازن تحميل لفرض خصائص أمان ملفات تعريف الارتباط