Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-11441 Overview
CVE-2024-11441 is a stored cross-site scripting (XSS) vulnerability in Serge version 0.9.0, an open-source chat interface for self-hosted LLaMA models. The flaw stems from improper neutralization of input during web page generation in the chat prompt component [CWE-79]. An attacker submits a crafted message containing HTML or JavaScript, which Serge stores and renders without sanitization. The payload executes in the browser of any user who later views the affected chat session. Successful exploitation enables session content manipulation, UI spoofing, and phishing against chat participants.
Critical Impact
Stored JavaScript executes in victim browsers whenever they load a poisoned chat, enabling phishing, session content tampering, and theft of data accessible to the Serge web application.
Affected Products
- Serge version 0.9.0
- Self-hosted Serge chat deployments exposing the web UI to untrusted users
- Shared multi-user Serge instances where chat histories are accessible across accounts
Discovery Timeline
- 2025-03-20 - CVE-2024-11441 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-11441
Vulnerability Analysis
Serge accepts user-authored chat prompts and renders them back into the web interface when the conversation is reopened. The chat renderer fails to encode HTML metacharacters or strip script-bearing markup before inserting prompt content into the Document Object Model (DOM). As a result, an attacker-controlled message is treated as live markup rather than text.
Because the malicious prompt is persisted in Serge's chat history, the payload fires on every subsequent load of the conversation. This stored behavior makes the vulnerability more impactful than reflected XSS, since no social engineering is required beyond directing the victim to open an existing chat.
The primary consequences include execution of arbitrary JavaScript in the user's browser context, rendering of attacker-controlled HTML to mimic legitimate application elements, and the staging of credential-harvesting prompts inside the trusted application origin.
Root Cause
The root cause is missing output encoding in the chat message rendering path. User input flows from the prompt submission endpoint into persistent storage and then back into the UI without contextual escaping for HTML. Serge treats stored prompts as pre-sanitized content, violating the principle of encoding on output.
Attack Vector
Exploitation requires network access to the Serge interface and a user interaction (UI:R) to open the poisoned chat. An attacker with the ability to post a chat message submits a prompt such as an inline <script> tag or an event-handler attribute on an injected element. Serge stores the message verbatim. When another user, or the attacker's victim account, loads the conversation, the browser parses the markup and executes the embedded script within Serge's origin.
For further technical context, see the Huntr Bug Bounty Listing.
Detection Methods for CVE-2024-11441
Indicators of Compromise
- Stored chat messages containing <script>, <img onerror=...>, <svg onload=...>, or other active HTML elements inside Serge's prompt database
- Outbound browser requests from Serge users to unexpected domains immediately after loading a chat history
- Unusual DOM mutations or injected <iframe> elements observed in browser developer tools when viewing a chat session
Detection Strategies
- Query the Serge chat datastore for prompt entries containing HTML tags or JavaScript event handler attributes
- Instrument the Serge web application with a Content Security Policy (CSP) report-only endpoint to surface inline script violations
- Review web proxy or browser telemetry for cross-origin requests originating from the Serge application domain that do not match normal API traffic
Monitoring Recommendations
- Log and alert on chat submissions whose length or character distribution deviates sharply from normal prompt usage
- Monitor authentication and session-cookie access patterns for Serge users to detect post-exploitation credential abuse
- Capture browser console errors from Serge sessions via front-end monitoring to identify blocked or executed script payloads
How to Mitigate CVE-2024-11441
Immediate Actions Required
- Restrict access to Serge 0.9.0 instances to trusted users only, pending an upstream fix
- Audit existing chat histories for stored HTML or script payloads and purge any malicious entries
- Place the Serge web interface behind an authenticating reverse proxy if it is currently exposed to untrusted networks
Patch Information
No vendor patch is referenced in the NVD record for CVE-2024-11441 at the time of publication. Operators should track the upstream Serge project repository and the Huntr Bug Bounty Listing for remediation updates and upgrade to a fixed release once available.
Workarounds
- Deploy a strict Content Security Policy that disallows inline scripts and restricts script sources to the Serge origin
- Front Serge with a web application firewall (WAF) rule that blocks HTML tags and JavaScript event handlers in chat prompt payloads
- Limit Serge accounts to a small, trusted group and disable shared or multi-tenant chat access until a sanitizing update is deployed
# Example restrictive CSP header for the Serge reverse proxy
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'" always;
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

