CVE-2023-40020

9.9 CRITICAL

📋 TL;DR

CVE-2023-40020 is an authentication bypass vulnerability in PrivateUploader that allows non-admin users to execute admin-only API endpoints. The vulnerability occurs because the admin controller incorrectly continues processing requests after returning a 403 error. All PrivateUploader instances running affected versions are vulnerable.

💻 Affected Systems

Products:
  • PrivateUploader
Versions: Versions before 3.2.49
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All installations with admin API endpoints enabled are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could gain administrative privileges, modify system settings, delete or access all uploaded files, and potentially execute arbitrary code on the server.

🟠

Likely Case

Unauthorized users could access administrative functions, modify upload settings, view or delete user files, and compromise the integrity of the hosted content.

🟢

If Mitigated

With proper network segmentation and access controls, impact would be limited to the PrivateUploader application itself rather than the underlying infrastructure.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires a valid user account (non-admin) and knowledge of admin API endpoints. The vulnerability is in the authentication logic itself.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.2.49

Vendor Advisory: https://github.com/PrivateUploader/PrivateUploader/security/advisories/GHSA-vhrw-2472-rrjx

Restart Required: Yes

Instructions:

1. Backup your current installation and database. 2. Update to version 3.2.49 or later using git pull or downloading the release. 3. Run npm install to update dependencies. 4. Restart the PrivateUploader service.

🔧 Temporary Workarounds

No workarounds available

all

The vendor advisory states there are no known workarounds for this vulnerability.

🧯 If You Can't Patch

  • Disable admin API endpoints or restrict access to them using network-level controls
  • Implement additional authentication layer (reverse proxy with strict ACLs) in front of PrivateUploader

🔍 How to Verify

Check if Vulnerable:

Check the package.json file for version number. If version is below 3.2.49, the system is vulnerable.

Check Version:

grep '"version"' package.json

Verify Fix Applied:

After updating, verify the version is 3.2.49 or higher and test that non-admin users cannot access admin endpoints.

📡 Detection & Monitoring

Log Indicators:

  • 403 responses from admin endpoints followed by successful operations
  • Non-admin users accessing /api/v3/admin/* routes

Network Indicators:

  • Unauthorized POST/PUT requests to admin API endpoints returning 403 but processing changes

SIEM Query:

source="privateuploader" AND (path="/api/v3/admin/*" AND user_role!="admin" AND response_code=403 AND request_successful=true)

🔗 References

📤 Share & Export