CVE-2025-53009: MaterialX Stack Overflow via Lack of MTLX XML Parsing Recursion Limit
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.
Published Jul 31, 2025 · Updated Jun 11, 2026
Affected packages
MaterialX
- Ecosystem
- PyPI
- Affected
- = 1.39.2
- Fixed in
- 1.39.3
- Check
pip show MaterialX
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to suidpit, TheZ3ro, ndaprela, smaury, three-star-potato.
References
- https://github.com/AcademySoftwareFoundation/MaterialX/security/advisories/GHSA-wx6g-fm6f-w822
- https://github.com/ShielderSec/poc/tree/main/CVE-2025-53009
- https://nvd.nist.gov/vuln/detail/CVE-2025-53009
- https://github.com/AcademySoftwareFoundation/MaterialX/issues/2504
- https://github.com/AcademySoftwareFoundation/MaterialX/pull/2505
- https://github.com/AcademySoftwareFoundation/MaterialX/releases/tag/v1.39.3
- https://github.com/AcademySoftwareFoundation/MaterialX/commit/91ffea0de7bfe7bcd0c399b07f04fc48227055ff
- https://github.com/advisories/GHSA-wx6g-fm6f-w822
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2025-53010
MaterialX Null Pointer Dereference in getShaderNodes due to Unchecked nodeGraph->getOutput return
low2.0Jul 31, 2025CVE-2025-53011
MaterialX Null Pointer Dereference in MaterialXCore Shader Generation due to Unchecked implGraphOutput
low2.0Jul 31, 2025CVE-2025-53012
MaterialX Lack of MTLX Import Depth Limit Leads to DoS (Denial-Of-Service) Via Stack Exhaustion
medium5.5Jul 31, 2025
