MaterialX Stack Overflow via Lack of MTLX XML Parsing Recursion Limit
Moderate severity
GitHub Reviewed
Published
Jul 31, 2025
in
AcademySoftwareFoundation/MaterialX
•
Updated Aug 1, 2025
Description
Published to the GitHub Advisory Database
Jul 31, 2025
Reviewed
Jul 31, 2025
Published by the National Vulnerability Database
Aug 1, 2025
Last updated
Aug 1, 2025
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.
References