CVE-2025-53010: MaterialX MaterialX Null Pointer Dereference Vulnerability

LOW
Advisory Identifier: GHSA-3jhf-gxhr-q4cx
CWE-476
Published
Advisory Summary

CVE-2025-53010 is a LOW materialx null pointer dereference vulnerability (CWE-476: NULL Pointer Dereference) affecting MaterialX libraries in the PyPI ecosystem. The issue involves materialx null pointer dereference in getshadernodes due to unchecked nodegraph->getoutput return. Remediation is available by upgrading affected packages to version 1.39.3.

CVE-2025-53010 at a Glance

CVE Identifier CVE-2025-53010
GHSA Identifier GHSA-3jhf-gxhr-q4cx
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-476: NULL Pointer Dereference
Affected Product MaterialX
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-53010

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-53010, 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-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. 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 shader nodes in a MTLX file, the MaterialXCore code accesses a potentially null pointer, which can lead to crashes with maliciously crafted files. ### Details In `src/MaterialXCore/Material.cpp`, in function `getShaderNodes`, the following code fetches the output nodes for a given `nodegraph` input node: ```cpp // SNIP... else if (input->hasNodeGraphString()) { // Check upstream nodegraph connected to the input. // If no explicit output name given then scan all outputs on the nodegraph. ElementPtr parent = materialNode->getParent(); NodeGraphPtr nodeGraph = parent->getChildOfType<NodeGraph>(input->getNodeGraphString()); if (!nodeGraph) { continue; } vector<OutputPtr> outputs; if (input->hasOutputString()) { outputs.push_back(nodeGraph->getOutput(input->getOutputString())); // <--- null ptr is returned } else { outputs = nodeGraph->getOutputs(); } for (OutputPtr output : outputs) { NodePtr upstreamNode = output->getConnectedNode(); // <--- CRASHES HERE if (upstreamNode && !shaderNodeSet.count(upstreamNode)) { if (!target.empty() && !upstreamNode->getNodeDef(target)) { continue; } shaderNodeVec.push_back(upstreamNode); shaderNodeSet.insert(upstreamNode); } } } } // SNIP... ``` The issues arise because the `nodeGraph->getOutput(input->getOutputString())` call can return a null pointer, therefore when trying to call `output->getConnectedNode()`, this results in a crash . ### PoC Please download `nullptr_getshadernodes.mltx` from the following link: https://github.com/ShielderSec/poc/tree/main/CVE-2025-53010 `build/bin/MaterialXView --material nullptr_getshadernodes.mtlx` ### Impact An attacker could intentionally crash a target program that uses OpenEXR by sending a malicious MTLX file.

CVE-2025-53010 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-53010?
CVE-2025-53010 is a security vulnerability in MaterialX involving MaterialX Null Pointer Dereference in getShaderNodes due to Unchecked nodeGraph->getOutput return under CWE-476: NULL Pointer Dereference.
Which MaterialX versions are affected?
Affected versions include releases prior to 1.39.3 across affected packages: MaterialX.
What version fixes CVE-2025-53010?
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-53010?
CVE-2025-53010 is classified under CWE-476: NULL Pointer Dereference (The product dereferences a pointer that it expects to be valid but is NULL.).
How can I check PyPI dependencies for CVE-2025-53010?
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-3jhf-gxhr-q4cx",
  "modified" : "2025-08-01T18:36:02Z",
  "published" : "2025-07-31T18:31:11Z",
  "aliases" : [ "CVE-2025-53010" ],
  "summary" : "MaterialX Null Pointer Dereference in getShaderNodes due to Unchecked nodeGraph->getOutput return",
  "details" : "### Summary\n\nWhen parsing shader nodes in a MTLX file, the MaterialXCore code accesses a potentially null pointer, which can lead to crashes with maliciously crafted files.\n\n### Details\n\nIn `src/MaterialXCore/Material.cpp`, in function `getShaderNodes`, the following code fetches the output nodes for a given `nodegraph` input node:\n\n```cpp\n// SNIP...\n        else if (input->hasNodeGraphString())\n        {\n            // Check upstream nodegraph connected to the input.\n            // If no explicit output name given then scan all outputs on the nodegraph.\n            ElementPtr parent = materialNode->getParent();\n            NodeGraphPtr nodeGraph = parent->getChildOfType<NodeGraph>(input->getNodeGraphString());\n            if (!nodeGraph)\n            {\n                continue;\n            }\n            vector<OutputPtr> outputs;\n            if (input->hasOutputString())\n            {\n                outputs.push_back(nodeGraph->getOutput(input->getOutputString())); // <--- null ptr is returned\n            }\n            else\n            {\n                outputs = nodeGraph->getOutputs();\n            }\n            for (OutputPtr output : outputs)\n            {\n                NodePtr upstreamNode = output->getConnectedNode(); // <--- CRASHES HERE\n                if (upstreamNode && !shaderNodeSet.count(upstreamNode))\n                {\n                    if (!target.empty() && !upstreamNode->getNodeDef(target))\n                    {\n                        continue;\n                    }\n                    shaderNodeVec.push_back(upstreamNode);\n                    shaderNodeSet.insert(upstreamNode);\n                }\n            }\n        }\n    }\n// SNIP...\n```\n\nThe issues arise because the `nodeGraph->getOutput(input->getOutputString())` call can return a null pointer, therefore when trying to call `output->getConnectedNode()`, this results in a crash    .\n\n\n### PoC\n\nPlease download `nullptr_getshadernodes.mltx` from the following link:\n\nhttps://github.com/ShielderSec/poc/tree/main/CVE-2025-53010\n\n`build/bin/MaterialXView --material nullptr_getshadernodes.mtlx`\n\n\n### Impact\n\nAn attacker could intentionally crash a target program that uses OpenEXR by sending a malicious MTLX file.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/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-3jhf-gxhr-q4cx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-53010"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/MaterialX/commit/e13344ba13326869d7820b444705f24d56fab73d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AcademySoftwareFoundation/MaterialX"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ShielderSec/poc/tree/main/CVE-2025-53010"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-476" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-31T18:31:11Z",
    "nvd_published_at" : "2025-08-01T18:15:54Z"
  }
}