CVE-2024-11171

7.5 HIGH

📋 TL;DR

This vulnerability allows unauthenticated attackers to crash LibreChat servers by uploading large files, causing denial of service through out-of-memory errors. All instances using default multer in-memory storage configuration are affected. The issue affects anyone running vulnerable versions of LibreChat.

💻 Affected Systems

Products:
  • danny-avila/librechat
Versions: All versions before 0.7.6
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations using multer's default in-memory storage. Disk storage configurations are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server crash and denial of service, potentially requiring manual restart and causing extended downtime.

🟠

Likely Case

Server becomes unresponsive or crashes when attackers upload large files, disrupting service availability.

🟢

If Mitigated

Minimal impact with proper file size limits and monitoring in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires only the ability to send HTTP requests with large file uploads.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.7.6

Vendor Advisory: https://github.com/danny-avila/librechat/commit/bb58a2d0662ef86dc75a9d2f6560125c018e3836

Restart Required: Yes

Instructions:

1. Update LibreChat to version 0.7.6 or later. 2. Restart the application. 3. Verify the fix by checking the version and testing file upload limits.

🔧 Temporary Workarounds

Configure multer with file size limits

all

Manually configure multer middleware to enforce file size limits before the official patch.

const upload = multer({ storage: storage, limits: { fileSize: 10 * 1024 * 1024 } })

Switch to disk storage

all

Configure multer to use disk storage instead of in-memory storage.

const upload = multer({ dest: 'uploads/' })

🧯 If You Can't Patch

  • Implement reverse proxy or WAF rules to limit request body size
  • Monitor server memory usage and set up alerts for abnormal spikes

🔍 How to Verify

Check if Vulnerable:

Check if LibreChat version is below 0.7.6 and multer is configured with in-memory storage without size limits.

Check Version:

Check package.json or run: npm list librechat

Verify Fix Applied:

Verify version is 0.7.6 or higher and test file uploads with sizes exceeding configured limits to ensure they are rejected.

📡 Detection & Monitoring

Log Indicators:

  • Out of memory errors
  • Process crashes
  • Large file upload requests
  • Multer error messages

Network Indicators:

  • Large HTTP POST requests to upload endpoints
  • Abnormal request patterns with large payloads

SIEM Query:

source="application.log" ("out of memory" OR "multer" OR "upload") AND size>10000000

🔗 References

📤 Share & Export