Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted document with malicious HTML
-
DeliveryPipeline partitions via v2/VLM parser
-
ExploitUnescaped markup stored in text_as_html
-
ExecutionReviewer renders output in browser
-
ImpactScript executes in viewer's origin
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concrete conditions: (1) the affected code path must be used - specifically partition_html(html_parser_version="v2") or the VLM partitioner, since these populate metadata.text_as_html via the unescaped to_html() routine in unstructured/documents/ontology.py; (2) the pipeline must emit or surface that output (elements_to_html() or metadata.text_as_html); and (3) a victim must render the generated HTML in a browser (UI:R), typically a privileged reviewer opening attacker-submitted content in a document-ingestion workflow. Limiting factors: the attacker only controls document content and cannot directly reach the victim - exploitation is second-order and depends on the output being displayed as live HTML; installations on 0.24.1 or later are not affected; pipelines that never render the HTML output in a browser, or that use only the v1 parser path, are not exposed. |
| Impact | This is a stored/DOM cross-site scripting flaw (CWE-79) rated CVSS 6.1 (Medium) with vector AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N. The signals are internally consistent: network-reachable, low complexity, no attacker authentication required (PR:N), but it does require victim interaction (UI:R) - a privileged reviewer must render the generated HTML/text_as_html in a browser. The scope change (S:C) correctly reflects that attacker script executes in the viewer's browser origin rather than in the library process itself, which is why confidentiality and integrity are rated Low and availability None. No EPSS score, CISA KEV listing, or public proof-of-concept exploit was provided in the input, so there is no public exploit identified at time of analysis; the only exploitation evidence is the vendor fix (sanitization added via nh3 allowlisting) and its regression tests demonstrating the dangerous payload classes (on* handlers, javascript:/data: URIs, tag/attribute breakout). This is a real but conditional issue rather than a drop-everything emergency: it is a classic second-order XSS whose impact hinges on an untrusted document reaching a trusted rendering surface, so prioritize it specifically in RAG/document-ingestion pipelines that display text_as_html or elements_to_html() output to human reviewers, and lower it where output is never rendered as live HTML in a browser. |
| Exploit ScenarioDerived | An attacker submits a crafted document (e.g. HTML, or content processed by the VLM partitioner) containing event-handler attributes, attribute-breakout markup, or a javascript: link. A pre-0.24.1 unstructured pipeline partitions it with html_parser_version="v2" and stores the unescaped markup in metadata.text_as_html / elements_to_html() output. When a privileged reviewer later opens that generated HTML in a browser, the attacker-controlled script executes in the viewer's origin. No public exploit is identified, but vendor regression tests demonstrate the exact payload classes. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Stored cross-site scripting in the Unstructured-IO unstructured Python library before 0.24.1 allows unauthenticated remote attackers to embed active content in parsed documents, which executes in a victim reviewer's browser origin when generated HTML output is rendered. The flaw affects partition_html(html_parser_version="v2") and the VLM partitioner, whose unescaped to_html() path preserves attacker-controlled tags, attributes, and javascript: links into metadata.text_as_html; exploitation is second-order and requires user interaction (CVSS 3.1 6.1, AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N). No public exploit identified at time of analysis; the vendor released a fix in unstructured 0.24.1 that adds the nh3 sanitization dependency.
RemediationAI
Upgrade to unstructured version 0.24.1 or later; the fix is vendor-released and adds a dependency on nh3>=0.3.0,<1.0.0 (see GHSA-v5mq-3xhg-98m9, PR #4394, commit cda16b3f2170019be9c6ea5635946fb3eaa2d66f). If immediate upgrade is not possible, do not render metadata.text_as_html or elements_to_html() output as live HTML in a browser: treat it as untrusted text or sanitize it with an external HTML sanitizer such as nh3 before display, and disable the v2 HTML parser path (use html_parser_version="v1") where feasible, noting that this may change parsing output and functionality. Restrict privileged document-review workflows that open untrusted submissions, and consider isolating such review in a low-privilege browser context or sandbox, accepting the operational overhead trade-off.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is a stored/DOM cross-site scripting (CWE-79) rooted in missing output encoding in unstructured/documents/ontology.py: the to_html() routine emits parsed document markup without escaping text or attribute values and without rejecting unsafe URL schemes. When partition_html(html_parser_version="v2") or the VLM partitioner processes untrusted documents (PDF, HTML, Word, etc.), it preserves attacker-controlled tags, attributes, event handlers, and link targets in metadata.text_as_html; later calls to elements_to_html() or any consumer that renders that metadata produce live HTML in the viewer's origin. The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N indicates a remote, unauthenticated, low-complexity attack that requires a victim to view the generated HTML (UI:R), with scope change because the malicious script runs in the viewer's origin. The upstream fix (commit cda16b3) introduces a shared sanitization policy using the nh3 library (>=0.3.0,<1.0.0), which HTML-escapes text and attribute values, drops on* event-handler attributes, allowlists tags and attributes, and filters URL schemes (http, https, mailto, tel, and relative preserved; data: limited to raster image MIME types on img[src]), leaving legitimate formatting intact.
Know when Unstructured gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attacker needs no authentication to submit a document (PR:N) but relies on a reviewer rendering the output (UI:R); script runs in the browser origin, a different component, so S:C with C:L/I:L and no availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
The unstructured library provides open-source components for ingesting and pre-processing images and text documents, such as PDFs, HTML, Word docs, and many more. Prior to 0.24.1, partition_html(html_parser_version="v2") and the VLM partitioner can preserve untrusted document tags, attributes, text, and link targets in metadata.text_as_html, while elements_to_html() emits the result as an HTML document. The to_html() path in unstructured/documents/ontology.py does not escape output or reject unsafe URL schemes, allowing event-handler attributes, attribute breakout markup, and javascript: links to survive parsing. When the generated HTML or text_as_html is rendered in a browser, attacker-controlled script can execute in the viewer's origin, including in document-ingestion workflows where a privileged reviewer opens submitted content. This issue is fixed in version 0.24.1.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
More in Unstructured
View allServer-side request forgery in the Unstructured-IO `unstructured` library (0.4.7 through versions before 0.24.0) lets an
The unstructured Python library for document ingestion has a path traversal vulnerability allowing arbitrary file read/w
EUVD-2026-98918
GHSA-v5mq-3xhg-98m9
NVD
CVE.org
EPSS
Exploit-DB