CVE-2024-3025

9.9 CRITICAL

📋 TL;DR

This path traversal vulnerability in mintplex-labs/anything-llm allows attackers to read or delete files outside the intended directory by manipulating logo filenames. The vulnerability affects systems running vulnerable versions of anything-llm with the logo upload functionality enabled. Attackers can exploit this via the /api/system/upload-logo and /api/system/logo endpoints.

💻 Affected Systems

Products:
  • mintplex-labs/anything-llm
Versions: Versions prior to commit 7de23dbb2da932fbfb39f56d981784d3702cf5ce
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any installation with the logo upload functionality accessible. The vulnerability exists in the default configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through reading sensitive files like database credentials, SSH keys, or configuration files, potentially leading to data theft, privilege escalation, or system takeover.

🟠

Likely Case

Unauthorized access to sensitive application files including the database, configuration files, and potentially user data stored in the application directory.

🟢

If Mitigated

Limited impact with proper input validation and file system permissions restricting access to sensitive directories.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires access to the logo upload endpoints but does not require authentication. The vulnerability is well-documented with public proof-of-concept available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit 7de23dbb2da932fbfb39f56d981784d3702cf5ce

Vendor Advisory: https://github.com/mintplex-labs/anything-llm/commit/7de23dbb2da932fbfb39f56d981784d3702cf5ce

Restart Required: Yes

Instructions:

1. Update to the latest version of anything-llm that includes commit 7de23dbb2da932fbfb39f56d981784d3702cf5ce. 2. Restart the anything-llm service. 3. Verify the fix by checking that path traversal attempts are properly blocked.

🔧 Temporary Workarounds

Disable logo upload endpoints

all

Block access to the vulnerable endpoints at the web server or application firewall level

# For nginx: add location block to deny /api/system/upload-logo and /api/system/logo
# For Apache: use LocationMatch directive to block these paths

Implement input validation proxy

all

Deploy a reverse proxy that validates and sanitizes filename parameters before they reach the application

# Configure WAF or reverse proxy rules to reject filenames containing ../ or absolute paths

🧯 If You Can't Patch

  • Implement strict file system permissions to restrict the application's access to only necessary directories
  • Deploy network segmentation to isolate the vulnerable system from sensitive data stores

🔍 How to Verify

Check if Vulnerable:

Test if the application accepts filenames containing path traversal sequences like '../../etc/passwd' via the logo upload endpoint

Check Version:

Check the git commit hash or version in the application's about/version endpoint or configuration files

Verify Fix Applied:

Attempt path traversal attacks after patching to confirm they are blocked. Check that the application now validates and sanitizes filename inputs.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns in application logs
  • Failed attempts to access restricted files via logo endpoints
  • Log entries showing path traversal sequences in filename parameters

Network Indicators:

  • HTTP requests to /api/system/upload-logo or /api/system/logo with suspicious filename parameters
  • Unusual outbound file transfers from the application server

SIEM Query:

source="application_logs" AND (uri="/api/system/upload-logo" OR uri="/api/system/logo") AND (filename="*../*" OR filename="*/..*" OR filename="*..\\*" OR filename="*\\\\*" OR filename="*:*")

🔗 References

📤 Share & Export