CVE-2024-3028

7.2 HIGH

📋 TL;DR

This vulnerability in mintplex-labs/anything-llm allows attackers to read and delete arbitrary files on the server by manipulating the 'logo_filename' parameter. Attackers can access sensitive files like the application's .env file containing credentials. Anyone running vulnerable versions of anything-llm is affected.

💻 Affected Systems

Products:
  • mintplex-labs/anything-llm
Versions: Versions before commit 7de23dbb2da932fbfb39f56d981784d3702cf5ce
Operating Systems: All operating systems running anything-llm
Default Config Vulnerable: ⚠️ Yes
Notes: All deployments with the vulnerable API endpoints enabled are affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise via credential theft from .env files, followed by data exfiltration, ransomware deployment, or lateral movement.

🟠

Likely Case

Sensitive file disclosure including configuration files, credentials, and application data, potentially leading to unauthorized access.

🟢

If Mitigated

Limited impact with proper network segmentation and file system permissions preventing access to critical system files.

🌐 Internet-Facing: HIGH - The vulnerability is exploitable via API endpoints that are typically exposed.
🏢 Internal Only: MEDIUM - Internal attackers could still exploit this to access sensitive files on the server.

🎯 Exploit Status

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

Exploitation requires API access but is straightforward with simple path traversal techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit 7de23dbb2da932fbfb39f56d981784d3702cf5ce and later

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

Restart Required: Yes

Instructions:

1. Update to the latest version of anything-llm. 2. Pull the latest code from GitHub. 3. Restart the anything-llm service.

🔧 Temporary Workarounds

API Endpoint Restriction

all

Restrict access to the vulnerable '/system-preferences' API endpoint using web server or application firewall rules.

# Example nginx location block to restrict access
location /api/system-preferences {
    deny all;
}

File System Permissions

linux

Set strict file system permissions to limit what files the anything-llm process can access.

# Restrict anything-llm to its own directory
chown -R anythingllm:anythingllm /opt/anything-llm
chmod 750 /opt/anything-llm

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can reach the anything-llm API endpoints.
  • Monitor for unusual file access patterns and API requests containing path traversal sequences.

🔍 How to Verify

Check if Vulnerable:

Check if your anything-llm version is older than commit 7de23dbb2da932fbfb39f56d981784d3702cf5ce by examining the git history or version metadata.

Check Version:

git log --oneline -1

Verify Fix Applied:

Verify the fix by checking that path traversal attempts in the logo_filename parameter are properly rejected with error messages.

📡 Detection & Monitoring

Log Indicators:

  • API requests to '/system-preferences' with unusual file paths in parameters
  • Error logs showing file access failures for system files

Network Indicators:

  • HTTP requests containing '../' sequences in parameters
  • Unusual file read patterns from the anything-llm process

SIEM Query:

source="anything-llm.logs" AND (uri_path="/api/system-preferences" AND (param="logo_filename" AND value CONTAINS "../"))

🔗 References

📤 Share & Export