CVE-2024-7957CWE-29

Arbitrary File Overwrite in danswer-ai/danswer

Critical · published March 20, 2025

CVSS v3.0
9.1
EPSS
1%
Percentile
60.9
In the wild
Unconfirmed
What it is

🔥 Attackers can take control with a simple file path trick! An arbitrary file overwrite vulnerability in the ZulipConnector of danswer-ai/danswer makes it alarmingly easy to mess with your files. ⚡ Think of this like someone snooping around your filing cabinet, swapping out important documents without permission. If they find a familiar folder in the cabinet, they can easily replace or create any document they want! The consequences here are absolutely devastating! An attacker could overwrite or create any file in the system, potentially compromising sensitive data, altering configurations, or creating backdoors for future access. Imagine the chaos if they replace your critical configuration files with malicious scripts!

Put simply

Think of this like someone snooping around your filing cabinet, swapping out important documents without permission. If they find a familiar folder in the cabinet, they can easily replace or create any document they want! This vulnerability arises from the load_credentials method, where user-controlled inputs for realm_name and zuliprc_content allow attackers to construct file paths and write to them. If an attacker exploits this flaw, they can gain full control over file contents in the zuliprc- directory residing in the temporary directory.

What to do

The consequences here are absolutely devastating! An attacker could overwrite or create any file in the system, potentially compromising sensitive data, altering configurations, or creating backdoors for future access. Imagine the chaos if they replace your critical configuration files with malicious scripts! To mitigate this, patch to the latest version of danswer-ai/danswer immediately, ensuring the load_credentials method properly validates and sanitizes user inputs. Additionally, implement stricter file path handling to avoid arbitrary file writes. You've got this! Follow these steps to safeguard your system and keep those files safe! 🛡️

The record
Technical detail
CVSS v3.0
9.1 · CRITICAL
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00952 · 60.9th percentile
Weakness
CWE-29 · Path Traversal: '\..\filename'
Published
2025-03-20T10:10Z
EPSS history
Timeline
  • 20 MAR 10:10Z
    Arbitrary File Overwrite in danswer-ai/danswer
    cvelistv5