polyhaven-studio-setup
Warn
Audited by Gen Agent Trust Hub on Jun 15, 2026
Risk Level: MEDIUMCOMMAND_EXECUTION
Full Analysis
- [DYNAMIC_EXECUTION]: The script constructs and sends Python code to a local Blender MCP server by interpolating command-line arguments directly into strings.
- File:
scripts/polyhaven-studio-setup.js - Vulnerability: The variable
matName, which can be assigned the raw string value from the--groundargument, is interpolated into a Python script passed to Blender's execution engine:bpy.data.materials.get("${matName}"). - Evidence:
res = await send('execute_code', { code: ... bpy.data.materials.get("${matName}") ... }on lines 105 and 112. - Risk: If an attacker can influence the arguments passed to this script (e.g., through a manipulated user request to the AI agent), they can execute arbitrary Python commands in the Blender process by providing a payload such as
"); import os; os.system('...'); #. - Mitigation: Sanitize all input arguments before interpolation. Use a whitelist for allowed texture IDs or escape double quotes in the input string.
Audit Metadata