CVE-2024-41703
📋 TL;DR
LibreChat through version 0.7.4-rc1 has an access control vulnerability that allows unauthorized users to modify messages belonging to other users. This affects all LibreChat deployments using vulnerable versions, potentially compromising message integrity and confidentiality.
💻 Affected Systems
- LibreChat
📦 What is this software?
Librechat by Librechat
Librechat by Librechat
⚠️ Risk & Real-World Impact
Worst Case
Attackers could modify, delete, or inject malicious content into any user's messages, leading to data manipulation, misinformation, or privilege escalation.
Likely Case
Unauthorized users can alter messages in conversations they shouldn't have access to, potentially causing confusion, data leakage, or minor disruption.
If Mitigated
With proper access controls, only authorized users can modify their own messages, maintaining message integrity and confidentiality.
🎯 Exploit Status
Exploitation requires authenticated access but minimal technical skill to modify API requests.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.7.4-rc2 and later
Vendor Advisory: https://github.com/danny-avila/LibreChat/pull/3363
Restart Required: Yes
Instructions:
1. Update LibreChat to version 0.7.4-rc2 or later. 2. Restart the LibreChat service. 3. Verify the fix by testing message update permissions.
🔧 Temporary Workarounds
Temporary Access Restriction
allDisable message editing functionality for all users until patched.
Modify LibreChat configuration to disable message updates
🧯 If You Can't Patch
- Implement network segmentation to restrict access to LibreChat instances
- Enable detailed logging of all message update attempts and monitor for unauthorized activity
🔍 How to Verify
Check if Vulnerable:
Check if LibreChat version is 0.7.4-rc1 or earlier. Attempt to update a message belonging to another user via API.
Check Version:
Check LibreChat version in admin panel or package.json file
Verify Fix Applied:
After updating, attempt to update another user's message - should receive authorization error.
📡 Detection & Monitoring
Log Indicators:
- Unauthorized message update attempts
- Failed authorization checks for message operations
Network Indicators:
- Unusual patterns of PUT/PATCH requests to message endpoints
SIEM Query:
source="librechat" AND (event="message_update" AND result="success" AND user_id!=target_user_id)
🔗 References
- https://github.com/danny-avila/LibreChat/discussions/3315#discussioncomment-10074284
- https://github.com/danny-avila/LibreChat/pull/3363
- https://github.com/realestate-com-au/vulnerability-disclosures/blob/main/LibreChat/CVE-2024-41703.md
- https://github.com/danny-avila/LibreChat/discussions/3315#discussioncomment-10074284
- https://github.com/danny-avila/LibreChat/pull/3363