CVE-2025-0182
Executive Summary
CVE-2025-0182 is a high-severity (CVSS 7.5) denial-of-service vulnerability affecting danswer-ai/danswer version 0.9.0. The root cause is the use of a vulnerable version of the starlette package (<=0.49) via fastapi. By sending multiple requests to the /auth/saml/callback endpoint, an attacker can trigger uncontrolled memory consumption, leading to service exhaustion and denial of service. The vulnerability was patched in fastapi version 0.115.3. No public exploit code or proof-of-concept is currently available.
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.
No signup required
Supply Chain & Package Security
This vulnerability originates from the starlette package, a dependency of fastapi, which is a dependency of danswer. The supply chain risk is significant because the vulnerable starlette version is pulled transitively. Organizations using danswer must ensure their fastapi dependency is updated to at least 0.115.3 to mitigate the risk.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – Impact confined to the vulnerable component.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): None (N) – No data modification.
- Availability (A): High (H) – Complete denial of service.
Threat Level: High. The low complexity and network-based attack vector make this a serious threat for unpatched instances.
Deep Dive & Mechanics
The vulnerability lies in the starlette package's handling of multipart form data or similar request parsing within the /auth/saml/callback endpoint. When multiple requests are sent, the server allocates memory for each request without proper bounds checking or cleanup, leading to uncontrolled memory consumption. This is a classic resource exhaustion vulnerability (CWE-400). The endpoint is likely used for SAML authentication callbacks, which may accept large or numerous parameters.
Vulnerable vs. Patched Code
Vulnerable (starlette <=0.49):
# Simplified example of vulnerable request handling
async def handle_saml_callback(request):
data = await request.form() # No size limit
# Process data...
Patched (starlette >0.49 / fastapi >=0.115.3):
# Patched version with size limits
from starlette.requests import Request
from starlette.datastructures import FormData
async def handle_saml_callback(request: Request):
# Enforce max size
data = await request.form(max_files=10, max_fields=20)
# Process data...
The patch introduces limits on the number of fields and files that can be parsed, preventing memory exhaustion.
Exploitation & Lab Setup
Red Team
Objective: Trigger denial of service by exhausting memory on the target danswer instance.
Prerequisites:
- Target running danswer 0.9.0 with
/auth/saml/callbackexposed. - No authentication required for the endpoint.
Exploitation Steps:
- Identify the target endpoint:
https://target.com/auth/saml/callback - Send multiple concurrent requests with large payloads:
# Using curl with large form data for i in {1..100}; do curl -X POST https://target.com/auth/saml/callback \ -F "field_$i=$(python3 -c 'print("A"*1000000)')" & done wait - Monitor memory usage on the target (if possible) or observe service unavailability.
Expected Outcome: The server's memory consumption increases until the process is killed or the system becomes unresponsive.
Blue Team
Objective: Detect and mitigate exploitation attempts.
Detection Steps:
- Monitor for high memory usage on the danswer server.
- Alert on multiple requests to
/auth/saml/callbackwith large payloads. - Implement rate limiting on the endpoint.
Mitigation Steps:
- Upgrade fastapi to >= 0.115.3.
- Apply virtual patching via WAF rules to block large requests.
- Restrict access to the endpoint to trusted IPs if possible.
Indicators of Compromise (IOCs)
- Network: Multiple POST requests to
/auth/saml/callbackwith large form data. - System: High memory usage by the danswer process.
- Logs: FastAPI/starlette logs showing repeated requests to the callback endpoint with large payloads.
Detection Engineering
YARA Rule
rule CVE_2025_0182_Exploit {
meta:
description = "Detects exploitation attempts for CVE-2025-0182"
author = "Valters IT"
date = "2025-01-01"
strings:
$s1 = "/auth/saml/callback" ascii wide nocase
$s2 = "POST" ascii wide nocase
condition:
$s1 and $s2
}
Sigma Rule
title: CVE-2025-0182 Exploitation Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects multiple POST requests to /auth/saml/callback with large payloads
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/auth/saml/callback'
sc-bytes: '>1000000'
condition: selection
falsepositives:
- Legitimate SAML callbacks with large assertions
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-0182 Exploitation Attempt"; flow:to_server; content:"POST"; http_method; content:"/auth/saml/callback"; http_uri; pcre:"/Content-Length:\s*\d{7,}/Hi"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade fastapi to version 0.115.3 or later.
- Virtual Patching: Deploy WAF rules to block requests with Content-Length > 1MB to
/auth/saml/callback. - Rate Limiting: Implement rate limiting on the endpoint to prevent abuse.
- Monitoring: Enable memory usage alerts for the danswer process.
- Network Segmentation: Restrict access to the endpoint to trusted networks if possible.
Valters IT – Securing your digital frontier.
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.