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 as objectName, samples, renderWidth, and renderHeight are 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 like Mesh"); 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 net module to connect to localhost:9876 and send JSON payloads containing Python code in the execute_code field.
  • Capability: The execute_code functionality 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
Risk Level
MEDIUM
Analyzed
Jun 15, 2026, 11:50 PM
Security Audit — agent-trust-hub — polyhaven-material-swap