CVE-2024-52517

4.6 MEDIUM

📋 TL;DR

This vulnerability in Nextcloud Server exposes global credentials in plain text through the API response when an attacker has access to an active user session. It allows unauthorized reading of sensitive credentials stored on the server. All Nextcloud Server instances using affected versions are vulnerable.

💻 Affected Systems

Products:
  • Nextcloud Server
  • Nextcloud Enterprise Server
Versions: Nextcloud Server: versions before 28.0.11, 29.0.8, 30.0.1; Nextcloud Enterprise Server: versions before 25.0.13.13, 26.0.13.9, 27.1.11.9, 28.0.11, 29.0.8, 30.0.1
Operating Systems: All platforms running Nextcloud
Default Config Vulnerable: ⚠️ Yes
Notes: All configurations using global credentials feature are affected. Requires attacker to have access to an active user session.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers with session access can steal all global credentials, potentially compromising other integrated services and systems that use those credentials.

🟠

Likely Case

Attackers with compromised user sessions can read sensitive credentials, leading to data exposure and potential lateral movement within the environment.

🟢

If Mitigated

With proper session security and access controls, the impact is limited to authorized users only accessing their own credentials.

🌐 Internet-Facing: MEDIUM - Internet-facing instances are at risk if user sessions are compromised through other means like phishing or credential theft.
🏢 Internal Only: MEDIUM - Internal instances still face risk from insider threats or compromised internal accounts.

🎯 Exploit Status

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

Exploitation requires authenticated session access. The vulnerability is straightforward to exploit once an attacker has session access.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Nextcloud Server: 28.0.11, 29.0.8, or 30.0.1; Nextcloud Enterprise Server: 25.0.13.13, 26.0.13.9, 27.1.11.9, 28.0.11, 29.0.8, or 30.0.1

Vendor Advisory: https://github.com/nextcloud/security-advisories/security/advisories/GHSA-x9q3-c7f8-3rcg

Restart Required: Yes

Instructions:

1. Backup your Nextcloud instance and database. 2. Update to the patched version using your package manager or manual download. 3. Run occ upgrade via command line. 4. Restart web server services. 5. Verify the update completed successfully.

🔧 Temporary Workarounds

Disable Global Credentials Feature

linux

Temporarily disable the global credentials functionality until patching is complete

occ config:app:set core global_credentials_enabled --value false

🧯 If You Can't Patch

  • Implement strict session management and monitoring to detect unauthorized access
  • Review and rotate all global credentials stored in Nextcloud

🔍 How to Verify

Check if Vulnerable:

Check your Nextcloud version against affected versions. If using global credentials feature and version is vulnerable, assume exposure.

Check Version:

occ status | grep 'versionstring'

Verify Fix Applied:

After updating, verify version is patched and test that global credentials are no longer exposed in API responses.

📡 Detection & Monitoring

Log Indicators:

  • Unusual API calls to credentials endpoints
  • Multiple credential access attempts from single session

Network Indicators:

  • API requests to /ocs/v2.php/apps/provisioning_api/api/v1/config/apps/core/global_credentials

SIEM Query:

source="nextcloud.log" AND ("global_credentials" OR "provisioning_api") AND status=200

🔗 References

📤 Share & Export