Skip to main content

unstructured EUVDEUVD-2026-98918

| CVE-2026-104250 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-10-13 GitHub_M GHSA-v5mq-3xhg-98m9
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted document with malicious HTML
  2. Delivery
    Pipeline partitions via v2/VLM parser
  3. Exploit
    Unescaped markup stored in text_as_html
  4. Execution
    Reviewer renders output in browser
  5. Impact
    Script 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

unstructured < 0.24.1

Affected Packages

pypi unstructured fix: 0.24.1

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

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 6.1 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Oct 13, 2026 - 18:19 EUVD

DescriptionCVE.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

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
popular open-source Python document-ingestion library used in RAG/LLM pipelines
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy