CVE-2023-39962

7.7 HIGH

📋 TL;DR

This vulnerability in Nextcloud Server allows a malicious authenticated user to delete any personal or global external storage configuration, making those storage locations inaccessible to all users. It affects Nextcloud Server versions 19.0.0 through 27.0.0 (excluding patched versions). The issue stems from improper access control in the files_external app.

💻 Affected Systems

Products:
  • Nextcloud Server
  • Nextcloud Enterprise Server
Versions: 19.0.0 through 27.0.0 (excluding patched versions)
Operating Systems: All platforms running Nextcloud
Default Config Vulnerable: ⚠️ Yes
Notes: Requires files_external app to be enabled and user authentication. Both personal and global external storage configurations are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could delete all external storage configurations, causing complete loss of access to external data sources and disrupting business operations that depend on these storage connections.

🟠

Likely Case

A malicious insider or compromised account deletes specific external storage configurations, causing targeted disruption to affected users or departments.

🟢

If Mitigated

With proper access controls and monitoring, impact is limited to temporary disruption until configurations can be restored from backups.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated user access. The vulnerability is in access control logic, making exploitation straightforward for authenticated attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Nextcloud Server: 25.0.9, 26.0.4, 27.0.1; Nextcloud Enterprise Server: 19.0.13.10, 20.0.14.15, 21.0.9.13, 22.2.10.14, 23.0.12.9, 24.0.12.5, 25.0.9, 26.0.4, 27.0.1

Vendor Advisory: https://github.com/nextcloud/security-advisories/security/advisories/GHSA-xwxx-2752-w3xm

Restart Required: No

Instructions:

1. Backup your Nextcloud instance. 2. Update to the patched version for your release branch. 3. Verify the update completed successfully. 4. Test external storage functionality.

🔧 Temporary Workarounds

Disable files_external app

linux

Temporarily disable the vulnerable files_external app to prevent exploitation while retaining storage configurations.

occ app:disable files_external

🧯 If You Can't Patch

  • Implement strict access controls and monitor for suspicious deletion of external storage configurations.
  • Regularly backup external storage configurations and maintain an incident response plan for restoration.

🔍 How to Verify

Check if Vulnerable:

Check your Nextcloud version and compare against affected versions. If using 19.0.0-27.0.0 and not on patched versions, you are vulnerable.

Check Version:

occ status | grep 'versionstring'

Verify Fix Applied:

After updating, verify your version matches one of the patched versions listed in the advisory.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected deletion of external storage configurations in Nextcloud logs
  • Multiple storage deletion events from single user account

Network Indicators:

  • Increased API calls to external storage management endpoints

SIEM Query:

source="nextcloud.log" AND "external storage" AND (delete OR remove)

🔗 References

📤 Share & Export