CVE-2024-46455: Unstructured Unstructured XML External Entity (XXE) Vulnerability

MODERATE
Advisory Identifier: GHSA-32r8-54hf-c9p3
CWE-611
Published
Advisory Summary

CVE-2024-46455 is a MODERATE unstructured xml external entity (xxe) vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Unstructured libraries in the PyPI ecosystem. The issue involves unstructured xml external entity (xxe). Remediation is available by upgrading affected packages to version 0.14.3.

CVE-2024-46455 at a Glance

CVE Identifier CVE-2024-46455
GHSA Identifier GHSA-32r8-54hf-c9p3
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Unstructured
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2024-46455

To remediate this vulnerability, upgrade all affected Unstructured dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

unstructured fixed: 0.14.3
pip install unstructured>=0.14.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show unstructured

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-46455, inspect your installed packages using pip:

pip show unstructured

Analyze the terminal output to locate any version of Unstructured in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.3), your application is affected.

Note: The pip show unstructured command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Unstructured, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

unstructured v.0.14.2 and before is vulnerable to XML External Entity (XXE) via the XMLParser.

CVE-2024-46455 Affected Unstructured Versions

1 component(s)
Fixed Versions:
0.14.3
Product / Package Ecosystem Affected Versions Fixed Version
unstructured
PyPI
< 0.14.3
0.14.3

References

Frequently Asked Questions

What is CVE-2024-46455?
CVE-2024-46455 is a security vulnerability in Unstructured involving unstructured XML External Entity (XXE) under CWE-611: Improper Restriction of XML External Entity Reference.
Which Unstructured versions are affected?
Affected versions include releases prior to 0.14.3 across affected packages: unstructured.
What version fixes CVE-2024-46455?
Upgrading to 0.14.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is unstructured affected?
Yes, unstructured is affected in releases prior to 0.14.3. Upgrade your dependency to 0.14.3 or later.
What CWE is associated with CVE-2024-46455?
CVE-2024-46455 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check PyPI dependencies for CVE-2024-46455?
Run the dependency tree command: 'pip show unstructured'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-32r8-54hf-c9p3",
  "modified" : "2024-12-10T19:18:15Z",
  "published" : "2024-12-09T21:31:02Z",
  "aliases" : [ "CVE-2024-46455" ],
  "summary" : "unstructured XML External Entity (XXE)",
  "details" : "unstructured v.0.14.2 and before is vulnerable to XML External Entity (XXE) via the XMLParser.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "unstructured"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.14.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-46455"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Unstructured-IO/unstructured/pull/3088"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Unstructured-IO/unstructured/commit/171b5df09fc3346aba8ce91c04de5b3e094a86bd"
  }, {
    "type" : "WEB",
    "url" : "https://binarysouljour.me/cve-2024-46455"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Unstructured-IO/unstructured"
  }, {
    "type" : "WEB",
    "url" : "https://www.tenable.com/cve/CVE-2024-46455"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-09T22:40:50Z",
    "nvd_published_at" : "2024-12-09T21:15:08Z"
  }
}