CVE-2024-3404

6.5 MEDIUM

📋 TL;DR

This vulnerability allows authenticated attackers to bypass access controls and read other users' chat history files in the gaizhenbiao/chuanhuchatgpt application. It affects users of version 20240121 who have authentication enabled. The flaw exposes sensitive conversation data to unauthorized access.

💻 Affected Systems

Products:
  • gaizhenbiao/chuanhuchatgpt
Versions: Version 20240121
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with authentication enabled. The vulnerability is in the access control mechanism for the history path.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could systematically harvest all users' chat histories containing sensitive personal information, credentials, or confidential business discussions.

🟠

Likely Case

Authenticated users accessing other users' chat histories, potentially exposing personal conversations or sensitive information.

🟢

If Mitigated

With proper access controls, users can only access their own chat history, maintaining data confidentiality.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access but is straightforward once authenticated. The vulnerability details and fix are publicly documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in commit ccc7479ace5c9e1a1d9f4daf2e794ffd3865fc2b

Vendor Advisory: https://github.com/gaizhenbiao/chuanhuchatgpt/commit/ccc7479ace5c9e1a1d9f4daf2e794ffd3865fc2b

Restart Required: Yes

Instructions:

1. Pull the latest code from the repository. 2. Apply commit ccc7479ace5c9e1a1d9f4daf2e794ffd3865fc2b. 3. Restart the application service.

🔧 Temporary Workarounds

Disable authentication

all

Remove authentication entirely to eliminate the vulnerability vector, though this reduces overall security.

Modify configuration to disable user authentication

Restrict history directory access

linux

Implement filesystem-level permissions to restrict access to history directories.

chmod 700 history_directory_path
chown specific_user:group history_directory_path

🧯 If You Can't Patch

  • Implement network segmentation to isolate the application from untrusted users.
  • Monitor access logs for unusual patterns of history file access.

🔍 How to Verify

Check if Vulnerable:

Check if running version 20240121 and test authenticated access to other users' history files via API or direct file access.

Check Version:

Check git commit history or application version file

Verify Fix Applied:

Verify the commit hash includes ccc7479ace5c9e1a1d9f4daf2e794ffd3865fc2b and test that authenticated users cannot access others' history files.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed access attempts to history paths
  • Successful access to history files from unexpected user accounts

Network Indicators:

  • Unusual patterns of API calls to history endpoints from single authenticated users

SIEM Query:

source="application_logs" AND (path="*history*" AND user!="expected_user")

🔗 References

📤 Share & Export