CVE-2024-7957

9.1 CRITICAL

📋 TL;DR

This vulnerability allows attackers to overwrite or create arbitrary files on systems running danswer-ai/danswer with ZulipConnector enabled. Attackers can exploit user-controlled input in the load_credentials method to write files anywhere a zuliprc- directory exists in the temporary directory. All users of danswer-ai/danswer with ZulipConnector functionality are affected.

💻 Affected Systems

Products:
  • danswer-ai/danswer
Versions: Latest version (as of vulnerability discovery)
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires ZulipConnector functionality to be enabled and accessible.

⚠️ 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

Complete system compromise through arbitrary file overwrite leading to remote code execution, privilege escalation, or data destruction.

🟠

Likely Case

Local file system manipulation allowing data corruption, denial of service, or information disclosure.

🟢

If Mitigated

Limited impact if proper input validation and file path sanitization are implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires access to the vulnerable endpoint and knowledge of temporary directory structure.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check vendor advisory for specific version

Vendor Advisory: https://huntr.com/bounties/21e9b909-036c-4544-ad35-6a5117836275

Restart Required: Yes

Instructions:

1. Check the vendor advisory for patch details
2. Update danswer-ai/danswer to the patched version
3. Restart the application service

🔧 Temporary Workarounds

Disable ZulipConnector

all

Temporarily disable ZulipConnector functionality until patched

Modify configuration to disable ZulipConnector integration

Restrict temporary directory permissions

linux

Set strict permissions on temporary directories to prevent file writes

chmod 700 /tmp/zuliprc-*
chown root:root /tmp/zuliprc-*

🧯 If You Can't Patch

  • Implement strict input validation for realm_name and zuliprc_content parameters
  • Use application-level file path validation and sanitization

🔍 How to Verify

Check if Vulnerable:

Check if ZulipConnector is enabled and accessible in your danswer-ai/danswer deployment

Check Version:

Check danswer-ai/danswer version in application configuration or deployment manifest

Verify Fix Applied:

Verify the application version matches the patched version from vendor advisory

📡 Detection & Monitoring

Log Indicators:

  • Unusual file write operations in temporary directories
  • Suspicious ZulipConnector API calls with crafted parameters

Network Indicators:

  • Abnormal requests to ZulipConnector endpoints with file path patterns

SIEM Query:

source="danswer-logs" AND (zuliprc_content CONTAINS "../" OR realm_name CONTAINS "/")

🔗 References

📤 Share & Export