{"id":"CVE-2026-104250","published":"2026-10-13T16:29:28Z","modified":"2026-10-14T15:32:42Z","title":"unstructured: Stored XSS via unescaped HTML generation","vendor":"Unstructured-IO","product":"unstructured","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00338,"percentile":0.19682,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/Unstructured-IO/unstructured/security/advisories/GHSA-v5mq-3xhg-98m9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/Unstructured-IO/unstructured/pull/4394","tags":["x_refsource_MISC"]},{"url":"https://github.com/Unstructured-IO/unstructured/commit/cda16b3f2170019be9c6ea5635946fb3eaa2d66f","tags":["x_refsource_MISC"]},{"url":"https://github.com/Unstructured-IO/unstructured/releases/tag/0.24.1","tags":["x_refsource_MISC"]}],"priority":{"score":8.2,"factors":[{"name":"EPSS percentile","points":3.94},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"unstructured-io","affectedVersions":[{"vendor":"Unstructured-IO","product":"unstructured","versions":["< 0.24.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-14T15:32:11.460266Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"unstructured","vulnerableRanges":["<0.24.1"],"patched":["0.24.1"],"from":["GHSA-v5mq-3xhg-98m9"],"provenance":"source"}],"summary":{"text":"The unstructured library (Unstructured-IO's unstructured product) contains a flaw in its HTML generation path, where the to_html() logic in unstructured/documents/ontology.py does not escape output or reject unsafe URL schemes, so untrusted content preserved by the partitioners ends up in generated HTML. An attacker who can get a crafted document processed, and who needs a victim to view the resulting HTML or text_as_html in a browser (user interaction), can have attacker-controlled script run in the viewer's origin, for example a privileged reviewer in a document-ingestion workflow.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:14:54Z"},"euvd":{"id":"EUVD-2026-98918","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-46455","published":"2024-12-09","fixed":"0.14.3","kev":false},{"cve":"CVE-2025-64712","published":"2026-02-04","fixed":"0.18.18","kev":false},{"cve":"CVE-2026-71428","published":"2026-08-20","fixed":"0.24.0","kev":false,"link":{"from":"CVE-2026-71428","to":"CVE-2026-104250","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:unstructured","fromFixed":"0.24.0","toFixed":"0.24.1","daysApart":54}]}},{"cve":"CVE-2026-104250","published":"2026-10-13","fixed":"0.24.1","kev":false}],"package":"PyPI:unstructured"}}