CVE-2024-22212

9.6 CRITICAL

📋 TL;DR

CVE-2024-22212 is an authentication bypass vulnerability in Nextcloud Global Site Selector that allows attackers to authenticate as any user due to a flaw in password verification. This affects all Nextcloud deployments using the Global Site Selector extension. Attackers can gain unauthorized access to user accounts and potentially administrative privileges.

💻 Affected Systems

Products:
  • Nextcloud Global Site Selector
Versions: All versions before 1.4.1, 2.1.2, 2.3.4, and 2.4.5
Operating Systems: All platforms running Nextcloud
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects deployments using the Global Site Selector extension. Standard Nextcloud installations without this extension are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of all Nextcloud instances managed by Global Site Selector, allowing attackers to access sensitive user data, modify configurations, and potentially pivot to other systems.

🟠

Likely Case

Unauthorized access to user accounts leading to data theft, privilege escalation, and potential lateral movement within the Nextcloud environment.

🟢

If Mitigated

Limited impact if proper network segmentation and access controls are in place, but authentication bypass still poses significant risk.

🌐 Internet-Facing: HIGH - Global Site Selector is typically internet-facing to redirect users to appropriate instances, making it directly accessible to attackers.
🏢 Internal Only: MEDIUM - Even internal-only deployments are vulnerable to insider threats or compromised internal systems.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability is in authentication logic, making exploitation straightforward once the attack vector is understood. No authentication required to exploit.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.4.1, 2.1.2, 2.3.4, or 2.4.5

Vendor Advisory: https://github.com/nextcloud/security-advisories/security/advisories/GHSA-vj5q-f63m-wp77

Restart Required: Yes

Instructions:

1. Backup your Nextcloud instance and database. 2. Update Global Site Selector via Nextcloud app store or manual installation. 3. Restart web server (Apache/Nginx) and PHP-FPM. 4. Clear Nextcloud cache via occ command: sudo -u www-data php occ files:scan --all

🔧 Temporary Workarounds

Disable Global Site Selector

linux

Temporarily disable the vulnerable extension until patching is possible

sudo -u www-data php occ app:disable globalsiteselector

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can reach the Global Site Selector endpoint
  • Enable detailed authentication logging and monitor for suspicious login attempts across all user accounts

🔍 How to Verify

Check if Vulnerable:

Check Global Site Selector version in Nextcloud admin interface under Apps section or run: sudo -u www-data php occ app:list | grep globalsiteselector

Check Version:

sudo -u www-data php occ app:list | grep -A2 'globalsiteselector'

Verify Fix Applied:

Verify version shows 1.4.1, 2.1.2, 2.3.4, or 2.4.5 after update. Test authentication with known credentials.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed authentication attempts followed by successful login from same IP
  • User logins from unusual locations or IPs
  • Authentication requests to Global Site Selector endpoints

Network Indicators:

  • Unusual authentication traffic patterns to /index.php/apps/globalsiteselector/ endpoints
  • Multiple authentication attempts in short timeframes

SIEM Query:

source="nextcloud.log" AND ("globalsiteselector" OR "authentication") AND (status="200" OR "success") | stats count by src_ip, user

🔗 References

📤 Share & Export