CVE-2026-104250: unstructured: Stored XSS via unescaped HTML generation

Published Oct 13, 2026
·
Updated

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, partitionhtml(htmlparserversion="v2") and the VLM partitioner can preserve untrusted document tags, attributes, text, and link targets in metadata.textashtml, while elementstohtml() emits the result as an HTML document. The tohtml() 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 textashtml 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.

Affected Software

1 affected component
pypi/unstructured<0.24.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade unstructured to a version that resolves this vulnerability.

    Fixed in 0.24.1

Event History

Oct 13, 2026
CVE Published
via MITRE·04:29 PM
Data Sourced
via MITRE·04:29 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are realistically exposed to script execution?

Deployments are exposed when they process untrusted documents with partition_html(html_parser_version="v2") or the VLM partitioner and later render metadata.text_as_html or HTML produced by elements_to_html() in a browser. Document-ingestion workflows are particularly affected if a privileged reviewer opens submitted content.

2

What does an attacker need to exploit this issue?

An attacker needs to supply content that is processed by an affected parsing path and have the resulting generated HTML rendered by a browser. The vulnerable output can retain event-handler attributes, attribute-breakout markup, and javascript: link targets.

3

Does exploitation require authentication or direct interaction with the vulnerable service?

The provided vector indicates no privileges are required and the attack can be delivered over the network, but user interaction is required. In practice, a viewer must render the attacker-controlled generated HTML or text_as_html.

4

What version fixes the issue?

Upgrade unstructured to version 0.24.1 or later. Versions prior to 0.24.1 are affected under the described parsing and rendering conditions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203