CVE-2024-8065

8.1 HIGH

📋 TL;DR

A Cross-Site Request Forgery (CSRF) vulnerability in Danswer AI version 1.4.1 allows attackers to trick authenticated users into performing unauthorized actions through their browser. This affects all users of the vulnerable version who access the application while authenticated. Attackers can connect malicious Slack bots, invite users, delete chats, and perform other actions without the victim's knowledge.

💻 Affected Systems

Products:
  • Danswer AI
Versions: v1.4.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of Danswer AI v1.4.1 are vulnerable regardless of configuration. The vulnerability exists because the application lacks CSRF protection entirely.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could connect the victim's Danswer instance to a malicious Slack bot that exfiltrates sensitive data, delete all chat histories, or invite unauthorized users to access the system.

🟠

Likely Case

Attackers would use phishing emails or malicious websites to trick authenticated users into performing actions like connecting to attacker-controlled Slack bots or deleting specific chats.

🟢

If Mitigated

With proper CSRF protection, all unauthorized actions would be blocked, and users would be protected from these attacks.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires the victim to be authenticated and visit a malicious website or click a malicious link. No authentication bypass is needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version after v1.4.1

Vendor Advisory: https://huntr.com/bounties/61b58753-af36-43fd-b1b9-f3019532dd08

Restart Required: No

Instructions:

1. Update Danswer AI to the latest version. 2. Verify CSRF protection is implemented. 3. Test that unauthorized requests are properly rejected.

🔧 Temporary Workarounds

Implement CSRF Tokens

all

Add CSRF token validation to all state-changing endpoints

SameSite Cookie Attribute

all

Set SameSite=Strict or Lax on session cookies to prevent CSRF

🧯 If You Can't Patch

  • Implement a web application firewall (WAF) with CSRF protection rules
  • Require re-authentication for sensitive actions and use double-submit cookie pattern

🔍 How to Verify

Check if Vulnerable:

Check if Danswer AI version is 1.4.1 and test if state-changing endpoints accept requests without CSRF tokens

Check Version:

Check the application version in the admin interface or configuration files

Verify Fix Applied:

Test that all POST/PUT/DELETE endpoints require valid CSRF tokens and reject requests without them

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed CSRF token validations
  • Unauthorized Slack bot connection attempts
  • Unexpected chat deletions or user invitations

Network Indicators:

  • Requests to sensitive endpoints without Referer headers or CSRF tokens
  • Outbound connections to unfamiliar Slack bot endpoints

SIEM Query:

source="danswer" AND (action="slack_connect" OR action="delete_chat" OR action="invite_user") AND csrf_token="null"

🔗 References

📤 Share & Export