Cross-Site Scripting (XSS) in unstructured (CVE-2026-104250)
Summary
Cross-site scripting in unstructured (CVE-2026-104250). Risk of unauthorized operations or information disclosure. Exploitable via unstructured. Mitigation: upgrade to 0.24.1 or later.
Original description
The description as published by the source.
Summary
When unstructured parses an untrusted document and outputs the result as HTML, malicious markup contained in the document (e.g. ``) is left in the output HTML without escaping. When that output is displayed in a browser, the script embedded in the document executes in the viewer's browser.
Details
partition_html(html_parser_version="v2") (and the VLM partitioner) preserve the input document's element tags, attributes, and text into metadata.text_as_html, and elements_to_html() outputs that as an HTML document.
The function that builds HTML on this path, to_html() in unstructured/documents/ontology.py, performs no escaping at all. As a result, event handlers such as onerror / onmouseover / onload originating from the input document are left in the output HTML as-is (literal tags are stripped by the parser, but attribute-based vectors and `javascript:` URLs are not). In addition, link URLs are not scheme-filtered, so is also emitted.
Relevant source: documents/ontology.py (to_html, _construct_attribute_string, _generate_final_html); partition/html/transformations.py (text_as_html = ontology_element.to_html()); partition/html/convert.py (elements_to_html).
PoC
Environment: downloads.unstructured.io/unstructured-io/unstructured:latest, unstructured 0.23.3.
from unstructured.partition.html import partition_html
from unstructured.partition.html.convert import elements_to_html
malicious = (''…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-104250 has been found in unstructured.
Attackers can target a specific entry point like unstructured over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 6.1/10.
What to do: upgrade unstructured to 0.24.1 or later.
If unsure, ask your IT team or search "unstructured CVE-2026-104250" on the vendor's site.
CVE-2026-104250 (unstructured) — CWE-79 / CVSS v3 6.1
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: unstructured / metadata.text_as_html / onerror / onmouseover
Patched: 0.24.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in unstructured. Attackers reach the vulnerable code path via unstructured without authentication.
Check the vendor advisory for the affected versions of unstructured. Attack surface: unstructured / metadata.text_as_html / onerror / onmouseover.
Severity: Medium (CVSS 6.1/10). Risk of unauthorized operations or information disclosure.
Update to 0.24.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'unstructured' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'unstructured' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
unstructuredを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade unstructured to 0.24.1ステージング環境で 0.24.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com