CVE-2025-53009: MaterialX MaterialX Stack Overflow Vulnerability

MODERATE
Advisory Identifier: GHSA-wx6g-fm6f-w822
CWE-121
Published
Advisory Summary

CVE-2025-53009 is a MODERATE materialx stack overflow vulnerability (CWE-121: Stack-based Buffer Overflow) affecting MaterialX libraries in the PyPI ecosystem. The issue involves materialx stack overflow via lack of mtlx xml parsing recursion limit. Remediation is available by upgrading affected packages to version 1.39.3.

CVE-2025-53009 at a Glance

CVE Identifier CVE-2025-53009
GHSA Identifier GHSA-wx6g-fm6f-w822
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-121: Stack-based Buffer Overflow
Affected Product MaterialX
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-53009

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

MaterialX fixed: 1.39.3
pip install MaterialX>=1.39.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 MaterialX

How to Check if You Are Affected

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

pip show MaterialX

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-121: Stack-based Buffer Overflow, where a stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). In MaterialX, 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

### Summary When parsing an MTLX file with multiple nested `nodegraph` implementations, the MaterialX XML parsing logic can potentially crash due to stack exhaustion. ### Details By specification, multiple kinds of elements in MTLX support nesting other elements, such as in the case of `nodegraph` elements. Parsing these subtrees is implemented via recursion, and since there is no max depth imposed on the XML document, this can lead to a stack overflow when the library parses an MTLX file with an excessively high number of nested elements. ### PoC Please download the `recursion_overflow.mtlx` file from the following link: https://github.com/ShielderSec/poc/tree/main/CVE-2025-53009 `build/bin/MaterialXView --material recursion_overflow.mtlx` ### Impact An attacker could intentionally crash a target program that uses MaterialX by sending a malicious MTLX file.

CVE-2025-53009 Affected MaterialX Versions

1 component(s)
Fixed Versions:
1.39.3
Product / Package Ecosystem Affected Versions Fixed Version
MaterialX
PyPI
≥ 1.39.2
< 1.39.3
All 1 versions
1.39.2
1.39.3

References

Frequently Asked Questions

What is CVE-2025-53009?
CVE-2025-53009 is a security vulnerability in MaterialX involving MaterialX Stack Overflow via Lack of MTLX XML Parsing Recursion Limit under CWE-121: Stack-based Buffer Overflow.
Which MaterialX versions are affected?
Affected versions include releases prior to 1.39.3 across affected packages: MaterialX.
What version fixes CVE-2025-53009?
Upgrading to 1.39.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is MaterialX affected?
Yes, MaterialX is affected in releases prior to 1.39.3. Upgrade your dependency to 1.39.3 or later.
What CWE is associated with CVE-2025-53009?
CVE-2025-53009 is classified under CWE-121: Stack-based Buffer Overflow (A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).).
How can I check PyPI dependencies for CVE-2025-53009?
Run the dependency tree command: 'pip show MaterialX'. 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-wx6g-fm6f-w822",
  "modified" : "2026-06-11T14:07:08Z",
  "published" : "2025-07-31T19:37:48Z",
  "aliases" : [ "CVE-2025-53009" ],
  "summary" : "MaterialX Stack Overflow via Lack of MTLX XML Parsing Recursion Limit ",
  "details" : "### Summary\n\nWhen parsing an MTLX file with multiple nested `nodegraph` implementations, the MaterialX XML parsing logic can potentially crash due to stack exhaustion.\n\n### Details\n\nBy specification, multiple kinds of elements in MTLX support nesting other elements, such as in the case of `nodegraph` elements. Parsing these subtrees is implemented via recursion, and since there is no max depth imposed on the XML document, this can lead to a stack overflow when the library parses an MTLX file with an excessively high number of nested elements.\n\n### PoC\n\nPlease download the `recursion_overflow.mtlx` file from the following link: \n\nhttps://github.com/ShielderSec/poc/tree/main/CVE-2025-53009\n\n`build/bin/MaterialXView --material recursion_overflow.mtlx`\n\n\n### Impact\nAn attacker could intentionally crash a target program that uses MaterialX by sending a malicious MTLX file.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "MaterialX"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.39.2"
      }, {
        "fixed" : "1.39.3"
      } ]
    } ],
    "versions" : [ "1.39.2" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/MaterialX/security/advisories/GHSA-wx6g-fm6f-w822"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-53009"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/MaterialX/issues/2504"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/MaterialX/pull/2505"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/MaterialX/commit/91ffea0de7bfe7bcd0c399b07f04fc48227055ff"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AcademySoftwareFoundation/MaterialX"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/MaterialX/releases/tag/v1.39.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ShielderSec/poc/tree/main/CVE-2025-53009"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-121" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-31T19:37:48Z",
    "nvd_published_at" : "2025-08-01T18:15:54Z"
  }
}