Skip to main content
Vulnerability Database/CVE-2026-111168

CVE-2026-111168: LibreDesk Stored XSS Vulnerability

CVE-2026-111168 is a stored XSS flaw in LibreDesk that lets authenticated agents execute malicious scripts via SVG uploads. This post covers technical details, affected versions, impact, and mitigation steps.

Published:

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-2026-111168 Overview

CVE-2026-111168 is a stored cross-site scripting (XSS) vulnerability in LibreDesk versions prior to 2.9.0-rc.8. The flaw allows authenticated agents to upload SVG files with malformed Content-Type parameters through the /api/v1/media endpoint. When another agent or administrator views the file via GET /uploads/{uuid}, the server returns the content inline without a Content Security Policy sandbox. The embedded script then executes in the victim's browser session.

The vulnerability is tracked under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

An authenticated agent can hijack administrator sessions, steal authentication tokens, or perform privileged actions by tricking any staff member into opening a crafted SVG URL.

Affected Products

  • LibreDesk versions prior to 2.9.0-rc.8
  • Deployments using the filesystem (fs) upload provider
  • Any instance exposing /api/v1/media and /uploads/{uuid} to authenticated agents

Discovery Timeline

  • 2026-10-15 - CVE-2026-111168 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-111168

Vulnerability Analysis

LibreDesk serves uploaded media files from the filesystem provider through the /uploads/{uuid} endpoint. The original implementation checked whether the stored Content-Type string equaled image/svg+xml exactly. When this comparison matched, the server set Content-Security-Policy: sandbox and avoided the inline disposition, blocking script execution inside SVG files.

The check failed to normalize the stored Content-Type before comparison. An attacker uploads an SVG with a Content-Type header such as image/svg+xml; x. The appended parameter prevents the exact-string match from firing. The server then treats the asset like any other inline image, omits the sandbox header, and returns the SVG with Content-Disposition: inline. The browser renders the SVG and executes any <script> elements it contains.

Because LibreDesk is a help desk application, uploaded media is routinely opened by other agents and administrators. The payload runs in the victim's authenticated session, giving the attacker access to session cookies, CSRF tokens, and any API endpoint the victim can reach.

Root Cause

The root cause is improper content-type validation in cmd/media.go. The original code compared media.ContentType directly against the literal string image/svg+xml without stripping MIME parameters. The patch introduces mmodels.NormalizeContentType() to strip parameters before the disposition and sandbox decisions are made.

Attack Vector

An authenticated agent sends a multipart upload to /api/v1/media with the SVG payload and a Content-Type of image/svg+xml; x. The server stores the raw content type. The attacker then shares the resulting /uploads/{uuid} URL inside a ticket, comment, or internal note. When a colleague opens the link, the SVG is served inline without a sandbox and the embedded JavaScript executes.

go
// Vulnerable logic (before patch) in cmd/media.go
disposition := "attachment"

// Inline images/videos/pdfs. SVG excluded.
if !forceDownload &&
    media.ContentType != "image/svg+xml" &&
    (strings.HasPrefix(media.ContentType, "image/") ||
     strings.HasPrefix(media.ContentType, "video/") ||
     media.ContentType == "application/pdf") {
    disposition = "inline"
}

r.RequestCtx.Response.Header.Set("Content-Type", media.ContentType)
// ...
// Sandbox SVGs.
if media.ContentType == "image/svg+xml" {
    r.RequestCtx.Response.Header.Set("Content-Security-Policy", "sandbox")
}

A Content-Type of image/svg+xml; x passes the != check, enters the inline branch, and bypasses the sandbox header. Source: GitHub Commit ab3a5ca.

Detection Methods for CVE-2026-111168

Indicators of Compromise

  • POST requests to /api/v1/media where the uploaded part's Content-Type contains parameters appended to image/svg+xml (for example image/svg+xml; x, image/svg+xml;charset=utf-8).
  • Stored media rows whose content_type column holds values other than the bare image/svg+xml string.
  • GET /uploads/{uuid} responses that return SVG content with Content-Disposition: inline and no Content-Security-Policy: sandbox header.
  • Outbound requests from agent browsers to attacker-controlled hosts shortly after a /uploads/ SVG fetch.

Detection Strategies

  • Inspect LibreDesk access logs for /api/v1/media uploads with SVG filenames, then correlate with the stored content_type to flag any value not equal to image/svg+xml.
  • Deploy a reverse-proxy or WAF rule that normalizes response Content-Type headers for /uploads/ paths and forces Content-Disposition: attachment on SVG content.
  • Review ticket activity for agents who uploaded SVGs followed by sharing /uploads/{uuid} links in internal communications.

Monitoring Recommendations

  • Alert when any authenticated agent uploads an SVG, since this file type is rarely needed for support workflows.
  • Monitor browser telemetry on agent workstations for script execution originating from the LibreDesk /uploads/ path.
  • Track administrator session anomalies such as unexpected API calls, privilege changes, or token refreshes immediately after viewing a shared media link.

How to Mitigate CVE-2026-111168

Immediate Actions Required

  • Upgrade LibreDesk to v2.9.0-rc.8 or later as released in GitHub Release v2.9.0-rc.8.
  • Audit the media table for existing rows with non-standard SVG content types and delete or re-serve them with Content-Disposition: attachment.
  • Rotate agent and administrator session tokens if evidence of exploitation is found.
  • Restrict the agent role so that only trusted staff can upload files to /api/v1/media.

Patch Information

The fix is delivered in Pull Request #641 and commit ab3a5ca. The patch introduces mmodels.NormalizeContentType() to strip MIME parameters before the inline-versus-attachment decision and applies Content-Security-Policy: sandbox to any disposition classified as attachment. See the VulnCheck Security Advisory on LibreDesk for the vendor-coordinated advisory.

Workarounds

  • Place LibreDesk behind a reverse proxy that rewrites Content-Type on /uploads/ responses, normalizes SVG media to image/svg+xml, and forces Content-Disposition: attachment.
  • Add a response header rule that injects Content-Security-Policy: sandbox on every /uploads/ response until the upgrade is applied.
  • Temporarily block SVG uploads at the proxy by rejecting multipart requests to /api/v1/media with SVG MIME types or .svg filenames.
bash
# NGINX workaround: sandbox all /uploads/ responses and force attachment disposition
location ^~ /uploads/ {
    proxy_pass http://libredesk_upstream;
    proxy_hide_header Content-Disposition;
    proxy_hide_header Content-Security-Policy;
    add_header Content-Security-Policy "sandbox" always;
    add_header Content-Disposition "attachment" always;
    add_header X-Content-Type-Options "nosniff" always;
}

# Block SVG uploads at the edge
location = /api/v1/media {
    if ($http_content_type ~* "image/svg\+xml") { return 415; }
    proxy_pass http://libredesk_upstream;
}

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.