CVE-2024-7767
📋 TL;DR
An improper access control vulnerability in danswer-ai/danswer v0.3.94 allows the first user created in the system to view, modify, and delete chats created by an Admin. This affects all deployments using the vulnerable version, potentially exposing sensitive chat data and compromising data integrity.
💻 Affected Systems
- danswer-ai/danswer
📦 What is this software?
Onyx by Onyx
⚠️ Risk & Real-World Impact
Worst Case
First user gains full control over all admin chats, leading to data theft, data destruction, compliance violations, and potential privilege escalation.
Likely Case
First user accesses sensitive admin conversations, potentially exposing confidential information or business intelligence.
If Mitigated
Limited impact with proper user management and monitoring, but still represents an access control failure.
🎯 Exploit Status
Requires being the first user created in the system, which limits widespread exploitation but makes targeted attacks feasible.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v0.3.95 or later
Vendor Advisory: https://huntr.com/bounties/1425dada-72d8-4bd9-a3e7-2863bb3e1a6c
Restart Required: No
Instructions:
1. Update danswer-ai/danswer to version v0.3.95 or later. 2. Verify the update completed successfully. 3. Review user permissions to ensure proper access controls are in place.
🔧 Temporary Workarounds
Restrict First User Permissions
allManually adjust permissions for the first user to remove admin chat access capabilities.
🧯 If You Can't Patch
- Monitor first user activity closely for unauthorized access to admin chats.
- Implement additional authentication layers or network segmentation to limit access.
🔍 How to Verify
Check if Vulnerable:
Check if running danswer-ai/danswer version v0.3.94. Review user creation logs to identify the first user.
Check Version:
docker inspect danswer-ai/danswer | grep version
Verify Fix Applied:
Confirm version is v0.3.95 or later. Test that first user cannot access admin chats.
📡 Detection & Monitoring
Log Indicators:
- First user accessing admin chat endpoints
- Unauthorized chat modifications or deletions
Network Indicators:
- Unusual API calls from first user to admin chat resources
SIEM Query:
source="danswer" AND (event="chat_access" OR event="chat_modify") AND user="first_user" AND target_user="admin"