# CVE-2026-41318: AnythingLLM vulnerable to stored DOM XSS in chart caption renderer - LLM-driven prompt injection produces executable HTML via unsanitized renderMarkdown(content.caption) in Chartable component

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-24T02:57:16.193Z
- Modified: 2026-10-26T22:10:00.163Z
- Weaknesses: CWE-79, CWE-116, CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

AnythingLLM is an application that turns pieces of content into context that any LLM can use as references during chatting. Prior to version 1.12.1, AnythingLLM's in-chat markdown renderer has an unsafe custom rule for images that interpolates the markdown image's `alt` text into an HTML `alt="..."` attribute without any HTML encoding. Every call-site in the app wraps `renderMarkdown(...)` with `DOMPurify.sanitize(...)` as defense-in-depth — except the `Chartable` component, which renders chart captions with no sanitization. The chart caption is the natural-language text the LLM emits around a `create-chart` tool call, so any attacker who can influence the LLM's output — most cheaply via indirect prompt injection in a shared workspace document, or directly if they can create a chart record in a multi-user workspace — can trigger stored DOM-level XSS in every other user's browser when they open that conversation. AnythingLLM chat history is loaded server-side via `GET /api/workspace/:slug/chats` and rendered directly into the chat UI. Version 1.12.1 contains a patch for this issue.

(As written by CVE List.)

## Affected

- Mintplex-Labs anything-llm: < 1.12.1
- mintplexlabs anythingllm: before 1.12.1

## References

- <https://github.com/Mintplex-Labs/anything-llm/security/advisories/GHSA-4q6m-qh3w-9gf5> (exploit, vendor-advisory)
- <https://github.com/Mintplex-Labs/anything-llm/commit/f5fa03f4728e483949f6360093bc3ea1ef555535> (patch)

## Sources

- CVE List: [CVE-2026-41318](https://www.cve.org/CVERecord?id=CVE-2026-41318), CVE Terms of Use, modified 2026-04-24
- NVD: [CVE-2026-41318](https://nvd.nist.gov/vuln/detail/CVE-2026-41318), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-41318 · Whole record: https://cve.day/CVE-2026-41318.json · Rebuilt by cve.day 2026-11-25T22:59:19.456Z
