The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41318

CVE-2026-41318: Mintplexlabs AnythingLLM XSS Vulnerability

CVE-2026-41318 is a stored DOM-level XSS flaw in Mintplexlabs AnythingLLM affecting versions prior to 1.12.1. Attackers can exploit the unsafe markdown renderer to execute malicious scripts in users' browsers. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: April 30, 2026

CVE-2026-41318 Overview

CVE-2026-41318 is a stored Cross-Site Scripting (XSS) vulnerability in AnythingLLM, an application that transforms content into context for LLM-based chat interactions. The vulnerability exists in the Chartable component's markdown rendering functionality, where chart captions containing LLM-generated output are rendered without proper HTML sanitization. This allows attackers to inject malicious scripts via indirect prompt injection in shared workspace documents, affecting all users who subsequently access the compromised conversation.

Critical Impact

Attackers can execute arbitrary JavaScript in victim browsers through stored XSS, potentially stealing session tokens, performing actions on behalf of users, or exfiltrating sensitive workspace data in multi-user AnythingLLM deployments.

Affected Products

  • Mintplexlabs AnythingLLM versions prior to 1.12.1
  • AnythingLLM multi-user workspace deployments
  • AnythingLLM instances with chart generation functionality enabled

Discovery Timeline

  • 2026-04-24 - CVE CVE-2026-41318 published to NVD
  • 2026-04-27 - Last updated in NVD database

Technical Details for CVE-2026-41318

Vulnerability Analysis

The vulnerability stems from inconsistent sanitization practices across AnythingLLM's markdown rendering pipeline. While most call-sites wrap renderMarkdown(...) with DOMPurify.sanitize(...) as a defense-in-depth measure, the Chartable component renders chart captions without this crucial sanitization step.

The chart caption contains natural-language text that the LLM emits around create-chart tool calls. Since this output is influenced by user-provided input and document content, an attacker can craft malicious payloads that, when processed by the LLM, result in XSS payloads being stored and executed in other users' browsers.

The attack surface is particularly dangerous because chat history is loaded server-side via GET /api/workspace/:slug/chats and rendered directly into the chat UI, creating a persistent stored XSS condition.

Root Cause

The root cause is the missing DOMPurify.sanitize() wrapper around markdown-rendered content in the Chartable component. Additionally, the custom image rule in the markdown renderer interpolates the alt text attribute without proper HTML encoding, creating an injection point when combined with the unsanitized chart caption rendering.

Attack Vector

The vulnerability is exploitable via network-based attacks requiring low privileges and user interaction. Attackers can trigger this vulnerability through two primary vectors:

  1. Indirect Prompt Injection: Injecting malicious content into shared workspace documents that influences the LLM's chart caption output
  2. Direct Chart Record Manipulation: Creating chart records with malicious captions in multi-user workspaces

When victims open the compromised conversation, the stored XSS payload executes in their browser context.

javascript
// Security patch in markdown.js - Adding HTML encoding to link renderer
markdown.renderer.rules.link_open = (tokens, idx) => {
  const token = tokens[idx];
  const href = token.attrs.find((attr) => attr[0] === "href");
  return `<a href="${HTMLEncode(href[1])}" target="_blank" rel="noopener noreferrer">`;
};

Source: GitHub Commit Changes

The patch introduces proper HTML encoding via HTMLEncode() for URL attributes and adds the missing DOMPurify import to the Chartable component:

text
 import Tooltip from "./CustomTooltip.jsx";
 import { safeJsonParse } from "@/utils/request.js";
 import renderMarkdown from "@/utils/chat/markdown.js";
+import DOMPurify from "dompurify";
 import { memo, useCallback, useState } from "react";
 import { saveAs } from "file-saver";
 import { useGenerateImage } from "recharts-to-png";

Source: GitHub Commit Changes

Detection Methods for CVE-2026-41318

Indicators of Compromise

  • Unusual JavaScript execution patterns in chat interfaces or browser developer console errors
  • Chart captions containing HTML tags, script elements, or event handlers (e.g., onerror, onload)
  • Workspace documents with embedded prompt injection payloads designed to manipulate LLM output
  • Unexpected network requests originating from the AnythingLLM chat interface to external domains

Detection Strategies

  • Implement Content Security Policy (CSP) headers to detect and block inline script execution attempts
  • Monitor server logs for GET /api/workspace/:slug/chats requests followed by anomalous client-side behavior
  • Deploy browser-based XSS detection tools to identify DOM manipulation attempts in the chat UI
  • Audit chart records in the database for suspicious HTML content or script tags in caption fields

Monitoring Recommendations

  • Enable detailed logging for workspace document uploads and chat history retrieval endpoints
  • Set up alerts for JavaScript errors or CSP violations in client monitoring tools
  • Monitor for unusual patterns in LLM responses that may indicate prompt injection attempts
  • Review user-generated content in shared workspaces for potential injection payloads

How to Mitigate CVE-2026-41318

Immediate Actions Required

  • Upgrade AnythingLLM to version 1.12.1 or later immediately
  • Audit existing chat histories and chart records for potential stored XSS payloads
  • Implement Content Security Policy headers as an additional defense layer
  • Review and sanitize workspace documents in shared environments for prompt injection content

Patch Information

The vulnerability is addressed in AnythingLLM version 1.12.1. The patch adds the DOMPurify import to the Chartable component and implements proper HTML encoding for attributes in the markdown renderer. Apply the update by pulling the latest release from the official repository. For detailed changes, review the GitHub Commit and the GitHub Security Advisory.

Workarounds

  • Temporarily disable the chart generation feature in AnythingLLM until the patch can be applied
  • Restrict workspace sharing and limit multi-user access to trusted users only
  • Implement a reverse proxy or Web Application Firewall (WAF) to filter XSS payloads in API responses
  • Review and sanitize all user-uploaded documents before allowing them into shared workspaces
bash
# Update AnythingLLM to patched version
cd /path/to/anything-llm
git fetch origin
git checkout v1.12.1
npm install
npm run build
# Restart the AnythingLLM service
pm2 restart anythingllm  # or your preferred process manager

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechMintplexlabs Anythingllm

  • SeverityMEDIUM

  • CVSS Score5.4

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Vendor Resources
  • GitHub Commit Changes

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2024-3166: Mintplexlabs AnythingLLM XSS Vulnerability

  • CVE-2026-5627: Mintplexlabs Anythingllm Path Traversal

  • CVE-2026-32617: Mintplexlabs AnythingLLM Auth Bypass Flaw

  • CVE-2026-32626: Mintplexlabs AnythingLLM RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English