polyhaven-material-swap
Warn
Audited by Gen Agent Trust Hub on Jun 15, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONREMOTE_CODE_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The skill is vulnerable to Python code injection because it constructs code strings using unvalidated input.
- Evidence: In
scripts/polyhaven-material-swap.js, variables such asobjectName,samples,renderWidth, andrenderHeightare interpolated directly into Python code templates. - Vulnerability: The script fails to sanitize or escape these variables before they are embedded in the Python string. For example, the code
obj = bpy.data.objects.get("${objectName}")allows an attacker to terminate the string and inject arbitrary Python commands using a payload likeMesh"); import os; os.system("..."); #. - Risk: Maliciously crafted command-line arguments can lead to arbitrary code execution within the context of the Blender application.
- [REMOTE_CODE_EXECUTION]: The skill transmits dynamically generated code over a network socket to a listening service.
- Evidence: The script uses the Node.js
netmodule to connect tolocalhost:9876and send JSON payloads containing Python code in theexecute_codefield. - Capability: The
execute_codefunctionality on the Blender MCP server is highly permissive, allowing any valid Python code to run with the permissions of the Blender process. - [DATA_EXFILTRATION]: The code injection vulnerability creates a significant surface for data exfiltration.
- Attack Surface: An attacker could use the injection vector to read sensitive local files or environment variables and exfiltrate them using Python's networking libraries or the existing socket connection.
Audit Metadata